[sgen] DTrace probes for world stop/restart.
[mono.git] / mono / metadata / sgen-stw.c
index 0e870e97c8dfdaa62521457374bd66e551c05917..1a845c91e9552b6574726c11e27abdb3875e8102 100644 (file)
@@ -214,6 +214,7 @@ sgen_stop_world (int generation)
        sgen_process_togglerefs ();
 
        mono_profiler_gc_event (MONO_GC_EVENT_PRE_STOP_WORLD, generation);
+       MONO_GC_WORLD_STOP_BEGIN ();
        acquire_gc_locks ();
 
        update_current_thread_stack (&count);
@@ -229,6 +230,7 @@ sgen_stop_world (int generation)
 
        SGEN_LOG (3, "world stopped %d thread(s)", count);
        mono_profiler_gc_event (MONO_GC_EVENT_POST_STOP_WORLD, generation);
+       MONO_GC_WORLD_STOP_END ();
 
        sgen_memgov_collection_start (generation);
 
@@ -249,6 +251,7 @@ sgen_restart_world (int generation, GGTimingInfo *timing)
        if (G_UNLIKELY (mono_profiler_events & MONO_PROFILE_GC_MOVES))
                sgen_gc_event_moves ();
        mono_profiler_gc_event (MONO_GC_EVENT_PRE_START_WORLD, generation);
+       MONO_GC_WORLD_RESTART_BEGIN ();
        FOREACH_THREAD (info) {
                info->stack_start = NULL;
 #ifdef USE_MONO_CTX
@@ -267,6 +270,7 @@ sgen_restart_world (int generation, GGTimingInfo *timing)
        max_pause_usec = MAX (usec, max_pause_usec);
        SGEN_LOG (2, "restarted %d thread(s) (pause time: %d usec, max: %d)", count, (int)usec, (int)max_pause_usec);
        mono_profiler_gc_event (MONO_GC_EVENT_POST_START_WORLD, generation);
+       MONO_GC_WORLD_RESTART_END ();
 
        bridge_process (generation);