comparison src/ChangeLog @ 1292:f3437b56874d

[xemacs-hg @ 2003-02-13 09:57:04 by ben] profile updates profile.c: Major reworking. Keep track of new information -- total function timing (includes descendants), GC usage, total GC usage (includes descendants). New functions to be called appropriately from eval.c, alloc.c to keep track of this information. Keep track of when we're actually in a function vs. in its profile, for more accurate timing counts. Track profile overhead separately. Create new mechanism for specifying "internal sections" that are tracked just like regular Lisp functions and even appear in the backtrace if `backtrace-with-internal-sections' is non-nil (t by default for error-checking builds). Add some KKCC information for the straight (non-Elisp) hash table used by profile, which contains Lisp objects in its keys -- but not used yet. Remove old ad-hoc methods for tracking garbage collection, redisplay (which was incorrect anyway when Lisp was called within these sections). Don't record any tick info when blocking under MS Windows, since the timer there is in real time rather than in process time. Make `start-profiling', `stop-profiling' interactive. Be consistent wrt. recursive functions and functions currently on the stack when starting or stopping -- together these make implementing the `total' values extremely difficult. When we start profiling, we act as if we just entered all the functions currently on the stack. Likewise when exiting. Create vars in_profile for tracking time spent inside of profiling, and profiling_lock for setting exclusive access to the main hash table when reading from it or modifying it. (protects against getting screwed up by the signal handle going off at the same time. profile.h: New file. Create macros for declaring internal profiling sections. lisp.h: Move profile-related stuff to profile.h. alloc.c: Keep track of total consing, for profile. Tell profile when we are consing. Use new profile-section method for noting garbage-collection. alloc.c: Abort if we attempt to call the allocator reentrantly. backtrace.h, eval.c: Add info for use by profile in the backtrace frame and transfer PUSH_BACKTRACE/POP_BACKTRACE from eval.c, for use with profile. elhash.c: Author comment. eval.c, lisp.h: New Lisp var `backtrace-with-internal-sections'. Set to t when error-checking is on. eval.c: When unwinding, eval.c: Report to profile when we are about-to-call and just-called wrt. a function. alloc.c, eval.c: Allow for "fake" backtrace frames, for internal sections (used by profile and `backtrace-with-internal-sections'. event-Xt.c, event-gtk.c, event-msw.c, event-tty.c: Record when we are actually blocking on an event, for profile's sake. event-stream.c: Record internal profiling sections for getting, dispatching events. extents.c: Record internal profiling sections for map_extents. hash.c, hash.h: Add pregrow_hash_table_if_necessary(). (Used in profile code since the signal handler is the main grower but can't allow a realloc(). We make sure, at critical points, that the table is large enough.) lread.c: Create internal profiling sections for `load' (which may be triggered internally by autoload, etc.). redisplay.c: Remove old profile_redisplay_flag. Use new macros to declare internal profiling section for redisplay. text.c: Use new macros to declare internal profiling sections for char-byte conversion and internal-external conversion. SEMI-UNRELATED CHANGES: ----------------------- text.c: Update the long comments.
author ben
date Thu, 13 Feb 2003 09:57:08 +0000
parents 5d97d6110cd9
children 8c5cf108f035
comparison
equal deleted inserted replaced
1291:3d99b5e6c6ec 1292:f3437b56874d
1 2003-02-13 Ben Wing <ben@xemacs.org>
2
3 * unicode.c (utf_16_detect):
4 Don't get snafued w/division-by-zero.
5
6 2003-02-12 Ben Wing <ben@xemacs.org>
7
8 * profile.c:
9 * profile.c (create_profile_tables):
10 * profile.c (current_profile_function):
11 * profile.c (profile_record_consing):
12 * profile.c (profile_record_about_to_call):
13 * profile.c (profile_record_just_called):
14 * profile.c (sigprof_handler):
15 * profile.c (Fstart_profiling):
16 * profile.c (Fstop_profiling):
17 * profile.c (Fclear_profiling_info):
18 * profile.c (copy_hash_table_or_blank):
19 * profile.c (Fget_profiling_info):
20 * profile.c (set_profiling_info_timing_maphash):
21 * profile.c (Fset_profiling_info):
22 * profile.c (mark_profiling_info_maphash):
23 * profile.c (mark_profiling_info):
24 * profile.c (vars_of_profile):
25 Major reworking. Keep track of new information -- total
26 function timing (includes descendants), GC usage, total GC usage
27 (includes descendants). New functions to be called appropriately
28 from eval.c, alloc.c to keep track of this information. Keep track
29 of when we're actually in a function vs. in its profile, for more
30 accurate timing counts. Track profile overhead separately. Create
31 new mechanism for specifying "internal sections" that are tracked
32 just like regular Lisp functions and even appear in the backtrace
33 if `backtrace-with-internal-sections' is non-nil (t by default
34 for error-checking builds). Add some KKCC information for the
35 straight (non-Elisp) hash table used by profile, which contains
36 Lisp objects in its keys -- but not used yet. Remove old ad-hoc
37 methods for tracking garbage collection, redisplay (which was
38 incorrect anyway when Lisp was called within these sections).
39 Don't record any tick info when blocking under MS Windows, since
40 the timer there is in real time rather than in process time.
41 Make `start-profiling', `stop-profiling' interactive. Be consistent
42 wrt. recursive functions and functions currently on the stack when
43 starting or stopping -- together these make implementing the
44 `total' values extremely difficult. When we start profiling, we
45 act as if we just entered all the functions currently on the stack.
46 Likewise when exiting. Create vars in_profile for tracking
47 time spent inside of profiling, and profiling_lock for setting
48 exclusive access to the main hash table when reading from it or
49 modifying it. (protects against getting screwed up by the signal
50 handle going off at the same time.
51
52 * profile.h: New file.
53 Create macros for declaring internal profiling sections.
54
55 * lisp.h:
56 Move profile-related stuff to profile.h.
57
58 * alloc.c:
59 * alloc.c (INCREMENT_CONS_COUNTER_1):
60 * alloc.c (DECREMENT_CONS_COUNTER):
61 * alloc.c (garbage_collect_1):
62 * alloc.c (vars_of_alloc):
63 Keep track of total consing, for profile.
64 Tell profile when we are consing.
65 Use new profile-section method for noting garbage-collection.
66
67 * alloc.c (xmalloc):
68 * alloc.c (xcalloc):
69 * alloc.c (xrealloc):
70 * alloc.c (endif):
71 Abort if we attempt to call the allocator reentrantly.
72
73 * backtrace.h:
74 * backtrace.h (FSET_FAST_UNSAFE):
75 * eval.c:
76 Add info for use by profile in the backtrace frame and transfer
77 PUSH_BACKTRACE/POP_BACKTRACE from eval.c, for use with profile.
78
79 * elhash.c: Author comment.
80
81 * eval.c (vars_of_eval):
82 * lisp.h:
83 New Lisp var `backtrace-with-internal-sections'. Set to t when
84 error-checking is on.
85
86 * eval.c:
87 * eval.c (unwind_to_catch):
88 When unwinding,
89
90 * eval.c (Fcommand_execute):
91 * eval.c (Feval):
92 * eval.c (Ffuncall):
93 Report to profile when we are about-to-call and just-called wrt. a
94 function.
95
96 * alloc.c (garbage_collect_1):
97 * eval.c (backtrace_unevalled_args):
98 * eval.c (Fbacktrace):
99 * eval.c (Fbacktrace_frame):
100 Allow for "fake" backtrace frames, for internal sections (used by
101 profile and `backtrace-with-internal-sections'.
102
103 * event-Xt.c:
104 * event-Xt.c (emacs_Xt_next_event):
105 * event-gtk.c:
106 * event-gtk.c (emacs_gtk_next_event):
107 * event-msw.c:
108 * event-msw.c (mswindows_need_event):
109 * event-tty.c:
110 * event-tty.c (emacs_tty_next_event):
111 Record when we are actually blocking on an event, for profile's sake.
112
113 * event-stream.c:
114 * event-stream.c (next_event_internal):
115 * event-stream.c (Fnext_event):
116 * event-stream.c (execute_internal_event):
117 * event-stream.c (Fdispatch_event):
118 * event-stream.c (syms_of_event_stream):
119 * event-stream.c (vars_of_event_stream):
120 Record internal profiling sections for getting, dispatching events.
121
122 * extents.c:
123 * extents.c (map_extents):
124 * extents.c (vars_of_extents):
125 Record internal profiling sections for map_extents.
126
127 * hash.c: Author comment.
128 * hash.c (grow_hash_table):
129 * hash.h:
130 Add pregrow_hash_table_if_necessary(). (Used in profile code
131 since the signal handler is the main grower but can't allow
132 a realloc(). We make sure, at critical points, that the table
133 is large enough.)
134
135 * lread.c:
136 * lread.c (Fload_internal):
137 * lread.c (done): New.
138 * lread.c (syms_of_lread):
139 * lread.c (vars_of_lread):
140 Create internal profiling sections for `load' (which may be triggered
141 internally by autoload, etc.).
142
143 * redisplay.c:
144 * redisplay.c (redisplay_without_hooks):
145 * redisplay.c (vars_of_redisplay):
146 Remove old profile_redisplay_flag. Use new macros to declare
147 internal profiling section for redisplay.
148
149 * text.c (charbpos_to_bytebpos_func):
150 * text.c (bytebpos_to_charbpos_func):
151 * text.c (dfc_convert_to_external_format):
152 * text.c (dfc_convert_to_internal_format):
153 * text.c (vars_of_text):
154 Use new macros to declare internal profiling sections for
155 char-byte conversion and internal-external conversion.
156
157 SEMI-UNRELATED CHANGES:
158 -----------------------
159
160 * text.c:
161 Update the long comments.
162
1 2003-02-07 Mike Sperber <mike@xemacs.org> 163 2003-02-07 Mike Sperber <mike@xemacs.org>
2 164
3 * scrollbar.c (specifier_vars_of_scrollbar): 165 * scrollbar.c (specifier_vars_of_scrollbar):
4 (specifier_vars_of_scrollbar): TTY devices don't have scrollbars. 166 (specifier_vars_of_scrollbar): TTY devices don't have scrollbars.
5 167