Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Probst <mark.probst@gmail.com>2012-11-05 15:08:41 +0400
committerMark Probst <mark.probst@gmail.com>2012-12-09 18:02:46 +0400
commit0654f84b19c48b3455586cbbbaaac1cd81cbee16 (patch)
tree697b4394bf0dfd00adb683fc4dbc43ec28a3bf68
parent5753461d10bf87e2e2526850747b2f9fc0738f98 (diff)
[sgen] DTrace probes for world stop/restart.
-rw-r--r--data/mono.d5
-rw-r--r--mono/metadata/sgen-stw.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/data/mono.d b/data/mono.d
index e2f4153beff..34daae60de3 100644
--- a/data/mono.d
+++ b/data/mono.d
@@ -19,6 +19,11 @@ provider mono {
probe gc__begin (int generation);
probe gc__end (int generation);
+ probe gc__world__stop__begin ();
+ probe gc__world__stop__end ();
+ probe gc__world__restart__begin ();
+ probe gc__world__restart__end ();
+
probe gc__heap__alloc (uintptr_t addr, uintptr_t len);
probe gc__heap__free (uintptr_t addr, uintptr_t len);
diff --git a/mono/metadata/sgen-stw.c b/mono/metadata/sgen-stw.c
index 0e870e97c8d..1a845c91e95 100644
--- a/mono/metadata/sgen-stw.c
+++ b/mono/metadata/sgen-stw.c
@@ -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);