/* pointer to a previously allocated heap */
/* object. */
-// Keep somewhat in sync with mono/metadata/profiler.h:enum MonoGCEvent
typedef enum {
GC_EVENT_START,
GC_EVENT_MARK_START,
// mono/metadata/profiler.h : MonoProfilerGCEvent
public enum LogGCEvent {
- Begin = 0,
- MarkBegin = 1,
- MarkEnd = 2,
- ReclaimBegin = 3,
- ReclaimEnd = 4,
- End = 5,
PreStopWorld = 6,
+ PreStopWorldLocked = 10,
PostStopWorld = 7,
+ Begin = 0,
+ End = 5,
PreStartWorld = 8,
PostStartWorld = 9,
- PreStopWorldLocked = 10,
PostStartWorldUnlocked = 11,
}
static void
on_gc_notification (GC_EventType event)
{
- MonoProfilerGCEvent e = (MonoProfilerGCEvent)event;
+ MonoProfilerGCEvent e;
- switch (e) {
- case MONO_GC_EVENT_PRE_STOP_WORLD:
+ switch (event) {
+ case GC_EVENT_PRE_STOP_WORLD:
+ e = MONO_GC_EVENT_PRE_STOP_WORLD;
MONO_GC_WORLD_STOP_BEGIN ();
break;
- case MONO_GC_EVENT_POST_STOP_WORLD:
+ case GC_EVENT_POST_STOP_WORLD:
+ e = MONO_GC_EVENT_POST_STOP_WORLD;
MONO_GC_WORLD_STOP_END ();
break;
- case MONO_GC_EVENT_PRE_START_WORLD:
+ case GC_EVENT_PRE_START_WORLD:
+ e = MONO_GC_EVENT_PRE_START_WORLD;
MONO_GC_WORLD_RESTART_BEGIN (1);
break;
- case MONO_GC_EVENT_POST_START_WORLD:
+ case GC_EVENT_POST_START_WORLD:
+ e = MONO_GC_EVENT_POST_START_WORLD;
MONO_GC_WORLD_RESTART_END (1);
break;
- case MONO_GC_EVENT_START:
+ case GC_EVENT_START:
+ e = MONO_GC_EVENT_START;
MONO_GC_BEGIN (1);
#ifndef DISABLE_PERFCOUNTERS
if (mono_perfcounters)
gc_start_time = mono_100ns_ticks ();
break;
- case MONO_GC_EVENT_END:
+ case GC_EVENT_END:
+ e = MONO_GC_EVENT_END;
MONO_GC_END (1);
#if defined(ENABLE_DTRACE) && defined(__sun__)
/* This works around a dtrace -G problem on Solaris.
break;
}
- MONO_PROFILER_RAISE (gc_event, (e, 0));
+ switch (event) {
+ case GC_EVENT_MARK_START:
+ case GC_EVENT_MARK_END:
+ case GC_EVENT_RECLAIM_START:
+ case GC_EVENT_RECLAIM_END:
+ break;
+ default:
+ MONO_PROFILER_RAISE (gc_event, (e, 0));
+ break;
+ }
- switch (e) {
- case MONO_GC_EVENT_PRE_STOP_WORLD:
+ switch (event) {
+ case GC_EVENT_PRE_STOP_WORLD:
mono_thread_info_suspend_lock ();
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_PRE_STOP_WORLD_LOCKED, 0));
break;
- case MONO_GC_EVENT_POST_START_WORLD:
+ case GC_EVENT_POST_START_WORLD:
mono_thread_info_suspend_unlock ();
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_POST_START_WORLD_UNLOCKED, 0));
break;
MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING = 9,
} MonoProfilerCodeBufferType;
-// Keep somewhat in sync with libgc/include/gc.h : GC_EventType.
typedef enum {
- MONO_GC_EVENT_START = 0,
- MONO_GC_EVENT_MARK_START = 1,
- MONO_GC_EVENT_MARK_END = 2,
- MONO_GC_EVENT_RECLAIM_START = 3,
- MONO_GC_EVENT_RECLAIM_END = 4,
- MONO_GC_EVENT_END = 5,
MONO_GC_EVENT_PRE_STOP_WORLD = 6,
/* When this event arrives, the GC and suspend locks are acquired. */
MONO_GC_EVENT_PRE_STOP_WORLD_LOCKED = 10,
MONO_GC_EVENT_POST_STOP_WORLD = 7,
+ MONO_GC_EVENT_START = 0,
+ MONO_GC_EVENT_END = 5,
MONO_GC_EVENT_PRE_START_WORLD = 8,
/* When this event arrives, the GC and suspend locks are released. */
MONO_GC_EVENT_POST_START_WORLD_UNLOCKED = 11,
static void G_GNUC_UNUSED
sgen_client_binary_protocol_mark_start (int generation)
{
- MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_MARK_START, generation));
}
static void G_GNUC_UNUSED
sgen_client_binary_protocol_mark_end (int generation)
{
- MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_MARK_END, generation));
}
static void G_GNUC_UNUSED
sgen_client_binary_protocol_reclaim_start (int generation)
{
- MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_RECLAIM_START, generation));
}
static void G_GNUC_UNUSED
sgen_client_binary_protocol_reclaim_end (int generation)
{
- MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_RECLAIM_END, generation));
}
static void
added an exception object field to TYPE_CLAUSE
class unload events no longer exist (they were never emitted)
removed type field from TYPE_SAMPLE_HIT
+ removed MONO_GC_EVENT_{MARK,RECLAIM}_{START,END}
*/
/*
SAMPLE_BRANCH_MISSES,
};
+enum {
+ MONO_GC_EVENT_MARK_START = 1,
+ MONO_GC_EVENT_MARK_END = 2,
+ MONO_GC_EVENT_RECLAIM_START = 3,
+ MONO_GC_EVENT_RECLAIM_END = 4,
+};
+
static const char*
sample_type_name (int type)
{