2a4e1588da56c6046289121cffb6187bf254ffea
[mono.git] / mono / profiler / ChangeLog
1
2 Tue Mar 16 11:20:14 CET 2010 Paolo Molaro <lupus@ximian.com>
3
4         * mono-profiler-iomap.c: fix some API usage and add a warning
5         about this code.
6
7 Wed Mar 3 19:17:14 CET 2010 Paolo Molaro <lupus@ximian.com>
8
9         * mono-profiler-iomap.c: use the normal allocation callback.
10
11 Wed Feb 24 15:55:31 CET 2010 Paolo Molaro <lupus@ximian.com>
12
13         * Makefile.am, mono-cov.c, mono-profiler-logging.c,
14         mono-profiler-aot.c: update to the new API/ABI.
15
16 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
17
18         * mono-profiler-aot.c (output_image): Emit method names instead of tokens so
19         the info can be used for different versions of the same assembly. Don't append
20         the assembly guid to the file names.
21
22 2010-01-11  Zoltan Varga  <vargaz@gmail.com>
23
24         * mono-profiler-logging.c (_ProfilerFileWriteBuffer): Use MONO_ZERO_LEN_ARRAY.
25         Fixes #569806.
26
27 2009-12-11  Marek Habersack  <mhabersack@novell.com>
28
29         * mono-profiler-iomap.c: added
30
31         * Makefile.am: added IOMAP profiler
32
33 2009-10-14  Massimiliano Mantione <massi@ximian.com>
34         * mono-profiler-logging.c: Removed MAX_STATISTICAL_CALL_CHAIN_DEPTH
35         definition (it belongs to the runtime), and implemented support for
36         different strategies for building call chains in stat mode.
37
38 2009-10-14  Massimiliano Mantione <massi@ximian.com>
39         * mono-profiler-logging.c: Removed useless "domain" parameter from
40         write_statistical_hit, and consequentely removed a call to
41         mono_thread_current from write_statistical_data_block (which sometimes
42         caused crashes on shutdown).
43
44 2009-09-14  Massimiliano Mantione <massi@ximian.com>
45         * mono-profiler-logging.c: Removed the use of signals to control the
46         profiler and extended the socket based interface to control also
47         heap snapshots.
48
49 2009-08-21  Massimiliano Mantione <massi@ximian.com>
50         * mono-profiler-logging.c: Changed max depth of call chains to 128.
51
52 2009-08-21  Massimiliano Mantione <massi@ximian.com>
53         * mono-profiler-logging.c: Report all wrapper types.
54
55 2009-08-21  Massimiliano Mantione <massi@ximian.com>
56         * mono-profiler-logging.c: While debugging file writes, also print the
57         exact number of bytes written to disk.
58
59 2009-08-18  Christian Hergert  <chris@dronelabs.com>
60
61         * mono-profiler-aot.c:
62         * mono-cov.c: Add missing method declarations.
63
64 2009-08-14  Massimiliano Mantione <massi@ximian.com>
65         * mono-profiler-logging.c (disable_profiler):
66         Flush buffers synchronously so the GUI knows when we are done.
67
68 2009-08-14  Massimiliano Mantione <massi@ximian.com>
69         * mono-profiler-logging.c:
70         - Added user thread reading commands from a local tcp port.
71         - Fixed file flushing after writing a block.
72         - Force full buffer flushing after disabling the profiler.
73
74 2009-08-06  Massimiliano Mantione <massi@ximian.com>
75         * mono-profiler-logging.c:
76         - Avoid registering the writer thread with the runtime unless when
77         it must create a heap snapshot.
78         - Simplified buffer flushing when an appdomain, image or assembly is
79         unloaded (now it can be done in the current thread).
80         - During shutdown, moved "code chunk cleanup" is a region of code
81         that holds the profiler lock.
82
83 2009-07-29  Massimiliano Mantione <massi@ximian.com>
84         * mono-profiler-logging.c: Implemented data structures to keep track
85         of code buffers produced by the runtime, and used them instead of
86         jit_info_table_find for the statistical profiler.
87         This eliminates crashes related to problems with the writer thread and
88         its registration to the runtime.
89
90 2009-06-18  Massimiliano Mantione <massi@ximian.com>
91         * mono-profiler-logging.c: Removed debugging printf statement.
92
93 2009-06-18  Massimiliano Mantione <massi@ximian.com>
94         * mono-profiler-logging.c:
95         Added assembly information to classes and wrapper flag to methods.
96
97 2009-05-25  Massimiliano Mantione <massi@ximian.com>
98         * mono-profiler-logging.c (write_thread_data_block): Only emit initial
99         stack snippet if we are tracking stacks.
100
101 2009-05-25  Massimiliano Mantione <massi@ximian.com>
102         * mono-profiler-logging.c (setup_user_options): Avoid tracking stacks
103         and emitting allocation caller information if we are already emitting
104         method enter and exit events.
105
106 2009-04-06  Massimiliano Mantione <massi@ximian.com>
107         * mono-profiler-logging.c: Added monitor contention profiling.
108         - Changed RESERVE_EVENTS to require a call to the new 
109         COMMIT_RESERVED_EVENTS macro after we have filled the event slots
110         (this allows to acquire all the event slots atomically).
111         - Created utility function "save_stack_delta".
112         - Created "monitor_event" callback.
113         - renamed "handle_heap_profiling" as "process_gc_event" because it
114         must be used also to help avoid interferences between garbage
115         collections and monitor profiling.
116
117 2009-03-23  Massimiliano Mantione <massi@ximian.com>
118         * mono-profiler-logging.c: Removed useless "gc-signal" option (the
119         newer "heap=<SIGNAL>" format of the "heap" option does the same thing).
120
121 2009-03-16  Massimiliano Mantione <massi@ximian.com>
122         * mono-profiler-logging.c: When checking if an elf file is valid,
123         avoid mapping it in memory until we know it's usable (avoids virtual
124         memory fragmentation issues).
125
126 2009-01-25  Massimiliano Mantione <massi@ximian.com>
127         * mono-profiler-logging.c: Bug fixing.
128         The issue is that while reading /proc/self/maps is can happen that
129         the last regions (typically [vsyscall] and [vsdo]) are reported more
130         than once (or anyway are read more than once, even when usng the plain
131         "read" call with no buffering), and I found no workaround for this.
132         So the code must be careful and throw away the duplicates.
133         - restore_old_regions: work starting from the new regions instead of
134         the old ones.
135         - sort_regions: introduce a "throw away the duplicates" pass.
136         - fix_region_references: added a pass to make sure that the elf files
137         always reference the new regions and not the old ones.
138         - refresh_memory_regions: call "sort_regions" before
139         "restore_old_regions" so we know we have no duplicates.
140
141 2009-01-18  Massimiliano Mantione <massi@ximian.com>
142         * mono-profiler-logging.c: Bug fixing.
143         - profiler_executable_memory_region_destroy: fixed a cut&paste mistake
144         causing a double free.
145         - executable_file_open: allow the code to look at all files, and fix
146         building of "files->new_files" list.
147         - executable_file_free: set "file->section_regions" to NULL when
148         freeing it (for safety).
149
150 2008-12-31  Massimiliano Mantione <massi@ximian.com>
151         * mono-profiler-logging.c: added "save-allocation-caller" option.
152
153 2008-12-30  Massimiliano Mantione <massi@ximian.com>
154         * mono-profiler-logging.c:
155         - profiler_executable_memory_region_destroy: fixed memory region
156         unloading.
157         - executable_file_add_region_reference: likewise.
158         - executable_file_close: likewise.
159         - executable_file_open: fixed file name handling.
160         - parse_map_line: likewise.
161         - scan_process_regions: likewise.
162         - statistical_call_chain: exit loop if the writer thread is busy.
163
164 2008-12-11  Massimiliano Mantione <massi@ximian.com>
165         * mono-profiler-logging.c:
166         - executable_file_open: Proper remember of already opened files.
167         - ProfilerStatisticalData: use unsigned values so the index never
168         trips over and becomes negative.
169         - statistical_call_chain, statistical_hit: likewise.
170
171 2008-12-11  Massimiliano Mantione <massi@ximian.com>
172         * mono-profiler-logging.c: Added defaults to command line options.
173
174 2008-12-01  Massimiliano Mantione <massi@ximian.com>
175         * mono-profiler-logging.c:
176         - ProfilerThreadStack: added "last_written_frame" and "written_frames"
177         fields to keep track of the call stacks actually written, so that we
178         can "replay" the full call stack at the beginning of each event block
179         (which allows the decoder to read blocks in random order and still see
180         all the call stacks correctly).
181         - gc_event: Fixed event creation sequence.
182         - Improved event logging (debugging) code.
183
184 2008-11-04  Massimiliano Mantione <massi@ximian.com>
185         * mono-profiler-logging.c:
186         Make sure that stack sections can be fully reconstructed even reading
187         only one block.
188
189 2008-10-10  Massimiliano Mantione <massi@ximian.com>
190         * mono-profiler-logging.c:
191         Added "aci" option to emit the object "id" at each allocation. 
192
193 2008-10-10  Massimiliano Mantione <massi@ximian.com>
194         * mono-profiler-logging.c:
195         Added support for handling the stack trace of each allocation event.
196         - MonoProfilerDirectives: added directive to state that allocations
197         have stack traces (not strictly needed, but simplifirs the decoder).
198         - ProfilerEventData: gave one more bit to code (and one less to value).
199         - MonoProfilerEvents: Added "stack section" event to record stack state.
200         - ProfilerThreadStack: added last_saved_top to track what we just saved.
201         - _MonoProfiler::action_flags: Added save_allocation_caller and
202         save_allocation_stack to state what we do for allocations.
203         - All "thread_stack_..." functions: Track last_saved_top.
204         - Added thread_stack_count_unsaved_frames utilty function.
205         - write_directives_block: handle ALLOCATIONS_HAVE_STACK directive.
206         - Added write_stack_section_event function.
207         - write_event: also handle emission of stack sections.
208         - Reworked all the "STORE_EVENT_..." macros to work on arbitrary event
209         slots (needed for stack sections), and as a consequence fixed all the
210         functions that use them.
211         - object_allocated: save "delta" stack section if needed.
212         - setup_user_options: handle new "sas" option.
213
214 2008-09-08  Massimiliano Mantione <massi@ximian.com>
215         * Makefile.am: Don't build the profilers if DISABLE_PROFILER is set.
216
217 2008-09-08  Massimiliano Mantione <massi@ximian.com>
218         * mono-profiler-logging.c:
219         - setup_user_options: made so that the user has to explicitly request
220         the "f" mode when the "h" is asked, otherwise the number of snapshot
221         blocks in the file is very confusing.
222         - Added three icalls to control the profiler from the profiled
223         application.
224
225 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
226
227         * mono-profiler-logging.c (detect_fast_timer): Add missing return type.
228
229 2008-08-21  Massimiliano Mantione <massi@ximian.com>
230         * mono-profiler-logging.c: Added support for correct accounting of
231         allocations which happened at JIT time.
232
233 2008-08-20  Massimiliano Mantione <massi@ximian.com>
234         * mono-profiler-logging.c: Added directives block, and used it to
235         state that "allocation attribution" done using the stack tracking (so
236         that allocation callers are directly written in the log file).
237
238 2008-07-28  Massimiliano Mantione <massi@ximian.com>
239         * mono-profiler-logging.c: Added stack tracking (even if still unused).
240
241 2008-07-28  Massimiliano Mantione <massi@ximian.com>
242         * mono-profiler-logging.c: Fix bug 412473:
243         - write_statistical_data_block: check if the current MonoThread still
244         exists, and if not avoid calling mono_jit_info_table_find.
245         - profiler_shutdown: flush everything in the current thread.
246
247 2008-07-28  Massimiliano Mantione <massi@ximian.com>
248         * mono-profiler-logging.c: Fix the "allocation summaries" feature
249         (I committed it but it never really worked until now).
250
251 2008-07-04  Massimiliano Mantione <massi@ximian.com>
252         * mono-profiler-logging.c: Emit full type names for loaded classes
253         (patch by Rodrigo Kumpera).
254
255 2008-07-04  Massimiliano Mantione <massi@ximian.com>
256         * mono-profiler-logging.c: Use the new "runtime initialized" hook.
257
258 2008-07-04  Massimiliano Mantione <massi@ximian.com>
259         * mono-profiler-logging.c: Fix an embarassingly stupid problem with
260         buffer sizes.
261
262 2008-07-03  Massimiliano Mantione <massi@ximian.com>
263         * mono-profiler-logging.c: Changed the way to wait for the writer
264         thread to avoid passing an invalid handle to pthread_join.
265
266 2008-06-28  Massimiliano Mantione <massi@ximian.com>
267         * mono-profiler-logging.c: When offloading flushing to the writer
268         thread, first check that it still exists.
269
270 2008-06-25  Massimiliano Mantione <massi@ximian.com>
271         * mono-profiler-logging.c: Offload more flushing to the writer thread,
272         and fix the shutdown sequence.
273
274 2008-06-25  Massimiliano Mantione <massi@ximian.com>
275         * mono-profiler-logging.c: Made so that at appdomain unload the
276         buffers are flushed by the profiler worker thread (which we know
277         is registered with the runtime).
278
279 2008-06-25  Massimiliano Mantione <massi@ximian.com>
280         * mono-profiler-logging.c: Added more logging code.
281
282 2008-06-25  Massimiliano Mantione <massi@ximian.com>
283         * mono-profiler-logging.c: Record also the domain of each statistical
284         hit, so that mono_jit_info_table_find works properly.
285
286 2008-06-25  Massimiliano Mantione <massi@ximian.com>
287         * mono-profiler-logging.c: Fixed breakage introduced in r105966
288
289 2008-06-17  Massimiliano Mantione <massi@ximian.com>
290         * mono-profiler-logging.c: Implemented signal based enable-disable
291         toggling for the statistical and enter-exit events.
292
293 2008-06-17  Massimiliano Mantione <massi@ximian.com>
294         * mono-profiler-logging.c (write_statistical_hit): Use the proper
295         domain instead of trying to get one.
296
297 2008-06-16  Massimiliano Mantione <massi@ximian.com>
298         * mono-profiler-logging.c (module_end_load, assembly_end_load):
299         Properly check the return value of "mono_assembly_fill_assembly_name",
300         otherwise "mono_stringify_assembly_name" can crash.
301
302 2008-06-16  Massimiliano Mantione <massi@ximian.com>
303         * mono-profiler-logging.c: Fix a segfault on shutdown (see Marek's
304         fix for the default profiler in r105466, the problem is the same.
305
306 2008-06-16  Massimiliano Mantione <massi@ximian.com>
307         * mono-profiler-logging.c: Initial implementation of summary report
308         for allocations at each collection.
309
310 2008-05-23  Massimiliano Mantione <massi@ximian.com>
311         * mono-profiler-logging.c: Fix warnings x86 and remove debugging code.
312
313 2008-05-23  Massimiliano Mantione <massi@ximian.com>
314         * mono-profiler-logging.c: Fix the build on x86.
315
316 2008-05-23  Massimiliano Mantione <massi@ximian.com>
317         * mono-profiler-logging.c: Support call chains (backtrace) in the
318         stat profiler.
319
320 2008-05-12  Massimiliano Mantione <massi@ximian.com>
321         * mono-profiler-logging.c (handle_heap_profiling): Flush all data
322         buffers, so that objext allocation events are written before the heap
323         description (which contains the "object free" events).
324
325 2008-05-12  Massimiliano Mantione <massi@ximian.com>
326         * mono-profiler-logging.c: Added support for a global counter of all
327         garbage collections, so that the file decoder can correlate the
328         events properly.
329
330 2008-05-12  Massimiliano Mantione <massi@ximian.com>
331         * mono-profiler-logging.c: Fixed a bug that prevented using rdtsc,
332         and enabled rdtsc by default,adding a command line option to revert
333         to using gettimeofday.
334
335 2008-05-02  Massimiliano Mantione <massi@ximian.com>
336          * mono-profiler-logging.c: Turned DEBUG_STATISTICAL_PROFILER off...
337
338 2008-05-02  Massimiliano Mantione <massi@ximian.com>
339          * mono-profiler-logging.c : Rework statistical profiler, adding the
340          ability to scan symbol tables in elf files instead of using dladdr
341          (dladdr skips lots of symbols which this way we get correctly).
342
343 2008-04-16  Massimiliano Mantione <massi@ximian.com>
344          * mono-profiler-logging.c (gc_event): Fix deadlock condition.
345
346 2008-04-16  Massimiliano Mantione <massi@ximian.com>
347          * mono-profiler-logging.c (write_current_block): Added an incremental
348          "counter delta" field to the block header, so that each block has a
349          timestamp directly in the header.
350          This will allow tools to know when a block has been emitted without
351          decoding (even without reading) the block contents.
352          So, if the user is only interested in blocks emitted in a certain
353          time interval, the tool can seek into the file instead of reading the
354          block contents.
355          Of course this breaks the file format, but at this stage we can still
356          do it, and... better now than later.
357
358 2008-04-10  Massimiliano Mantione <massi@ximian.com>
359         * mono-profiler-logging.c (profiler_heap_scan): removed debugging code
360         and therefore removed unconditional inclusion of signal.h (it is now
361         included anyway on Unix platforms).
362
363 2008-04-10  Massimiliano Mantione <massi@ximian.com>
364         * mono-profiler-logging.c: Added possibiliy of requesting heap
365         snapshots with a signal (like heap-shot).
366
367 2008-04-02  Rodrigo Kumpera <rkumpera@novell.com>
368
369         * mono-profiler-logging.c: Fix the arm build. G_BREAKPOINT() does
370         a "raise(SIGTRAL)" and in some platforms <signal.h> must be included.
371
372 2008-03-28  Massimiliano Mantione <massi@ximian.com>
373         * mono-profiler-logging.c: Added option to append a suffix to the
374         default file name.
375
376 2008-03-27  Massimiliano Mantione <massi@ximian.com>
377         * mono-profiler-logging.c: setup_user_options: set default log file
378         name to the name of the executed application.
379
380 2008-03-26  Massimiliano Mantione <massi@ximian.com>
381         * Makefile.am: enabled the logging profiler on Linux.
382
383 2008-03-26  Massimiliano Mantione <massi@ximian.com>
384         * mono-profiler-logging.c: Attach and detach the writer thread.
385
386 2008-03-25  Massimiliano Mantione <massi@ximian.com>
387         * mono-profiler-logging.c: Fixed bug with memory region indexes.
388
389 2008-03-18  Massimiliano Mantione <massi@ximian.com>
390         * mono-profiler-logging.c:
391         OPEN_FILE(): Fixed file creation.
392         [UN]LOCK_PROFILER(): Removed logging message.
393
394 2008-03-11  Massimiliano Mantione <massi@ximian.com>
395         * mono-profiler-logging.c: Fixed heap profiler, added a new way to
396         get the symbol names for unmanaged functions, and fixed lots of bugs.
397
398 2008-01-08  Massimiliano Mantione <massi@ximian.com>
399         * mono-profiler-logging.c: First code drop of new logging profiler
400         (and shamefully forgot to set HAS_OPROFILE to 0...).
401         * Makefile.am: Added logging profiler, but commented in out to avoid
402         breaking the build on Windows.
403
404 2005-07-25  Zoltan Varga  <vargaz@freemail.hu>
405
406         * mono-cov.c: Applied patch from Iain McCoy (iain@mccoy.id.au). Fixes
407         #75619.
408
409 2003-11-12  Jackson Harper  <jackson@ximian.com>
410
411         * mono-cov.c: Change default assembly name to mscorlib.dll
412         
413 Tue Jul 1 11:26:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
414
415         * Makefile.am: added.
416
417 Mon Jun 16 18:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
418
419         * mono-cov.c: coverage profiler.
420