comparison src/profile.c @ 2514:b49d38bc659d

[xemacs-hg @ 2005-01-26 10:09:19 by ben] Minor changes to profile code profile.c, profile.h: Add fillers for easier temporary profiling. Add RETURN_UNGCPRO_EXIT_PROFILING, RETURN_EXIT_PROFILING.
author ben
date Wed, 26 Jan 2005 10:09:20 +0000
parents ab71ad6ff3dd
children 9f70af3ac939
comparison
equal deleted inserted replaced
2513:d8595adfc810 2514:b49d38bc659d
1 /* Why the hell is XEmacs so fucking slow? 1 /* Why the hell is XEmacs so fucking slow?
2 Copyright (C) 1996, 2002, 2003 Ben Wing. 2 Copyright (C) 1996, 2002, 2003, 2004 Ben Wing.
3 Copyright (C) 1998 Free Software Foundation, Inc. 3 Copyright (C) 1998 Free Software Foundation, Inc.
4 4
5 This file is part of XEmacs. 5 This file is part of XEmacs.
6 6
7 XEmacs is free software; you can redistribute it and/or modify it 7 XEmacs is free software; you can redistribute it and/or modify it
65 65
66 int profiling_active; 66 int profiling_active;
67 67
68 static Lisp_Object QSprocessing_events_at_top_level; 68 static Lisp_Object QSprocessing_events_at_top_level;
69 static Lisp_Object QSunknown, QSprofile_overhead; 69 static Lisp_Object QSunknown, QSprofile_overhead;
70
71 #ifdef DEBUG_XEMACS
72 /* For temporary profiling */
73 Lisp_Object QSin_temp_spot_1;
74 Lisp_Object QSin_temp_spot_2;
75 Lisp_Object QSin_temp_spot_3;
76 Lisp_Object QSin_temp_spot_4;
77 Lisp_Object QSin_temp_spot_5;
78 #endif /* DEBUG_XEMACS */
70 79
71 static Lisp_Object Qtiming, Qtotal_timing, Qcall_count; 80 static Lisp_Object Qtiming, Qtotal_timing, Qcall_count;
72 static Lisp_Object Qgc_usage, Qtotal_gc_usage; 81 static Lisp_Object Qgc_usage, Qtotal_gc_usage;
73 82
74 /* This needs to be >= the total number of defined internal sections, 83 /* This needs to be >= the total number of defined internal sections,
671 dump_add_root_block_ptr (&big_profile_table, &plain_hash_table_description); 680 dump_add_root_block_ptr (&big_profile_table, &plain_hash_table_description);
672 #endif /* 0 */ 681 #endif /* 0 */
673 682
674 profiling_lock = 0; 683 profiling_lock = 0;
675 684
685 #ifdef DEBUG_XEMACS
686 QSin_temp_spot_1 = build_msg_string ("(in temp spot 1)");
687 staticpro (&QSin_temp_spot_1);
688
689 QSin_temp_spot_2 = build_msg_string ("(in temp spot 2)");
690 staticpro (&QSin_temp_spot_2);
691
692 QSin_temp_spot_3 = build_msg_string ("(in temp spot 3)");
693 staticpro (&QSin_temp_spot_3);
694
695 QSin_temp_spot_4 = build_msg_string ("(in temp spot 4)");
696 staticpro (&QSin_temp_spot_4);
697
698 QSin_temp_spot_5 = build_msg_string ("(in temp spot 5)");
699 staticpro (&QSin_temp_spot_5);
700 #endif /* DEBUG_XEMACS */
701
676 QSunknown = build_msg_string ("(unknown)"); 702 QSunknown = build_msg_string ("(unknown)");
677 staticpro (&QSunknown); 703 staticpro (&QSunknown);
678 QSprocessing_events_at_top_level = 704 QSprocessing_events_at_top_level =
679 build_msg_string ("(processing events at top level)"); 705 build_msg_string ("(processing events at top level)");
680 staticpro (&QSprocessing_events_at_top_level); 706 staticpro (&QSprocessing_events_at_top_level);