[Mono-devel-list] [PATCH] GC Profiling Interfaces

Massimiliano Mantione massi at ximian.com
Mon Jan 24 05:26:31 EST 2005


On Sun, 2005-01-23 at 12:16, Paolo Molaro wrote:
> enum {
> 	/* maybe also add suspend and resume events */
> 	MONO_GC_EVENT_START,
> 	MONO_GC_EVENT_RECLAIM,
> 	MONO_GC_EVENT_END
> };
> 
> typedef void (*MonoProfileGCFunc)         (MonoProfiler *prof, int event_type, int gen_num);
> 
> Of course for the current GC the generation number will be always 0, but
> the interface will work with the new GC. Note also that the generation number
> is not needed, since you can easily keep your counter when the MONO_GC_EVENT_START
> event is received.

Not that it matters that much, but I'd probably keep the generation
number parameter in the callback.

I wonder if it would be possible to register a callback handler
after a START event has been emitted, and what should happen in such
a case...
Mind you, I'm asking this just to understand better how these things
should work ;-)

Ciao,
  Massi





More information about the Mono-devel-list mailing list