projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #5714 from alexischr/update_bockbuild
[mono.git]
/
mono
/
metadata
/
sgen-stw.c
diff --git
a/mono/metadata/sgen-stw.c
b/mono/metadata/sgen-stw.c
index b90f8c2789e91f0952f4e34a1237f19bff14e7ec..a8a1b9bf32c9f8437d6772e3031ddf03ea1e3625 100644
(file)
--- a/
mono/metadata/sgen-stw.c
+++ b/
mono/metadata/sgen-stw.c
@@
-70,6
+70,8
@@
update_current_thread_stack (void *start)
#if !defined(MONO_CROSS_COMPILE) && MONO_ARCH_HAS_MONO_CONTEXT
MONO_CONTEXT_GET_CURRENT (info->client_info.ctx);
#if !defined(MONO_CROSS_COMPILE) && MONO_ARCH_HAS_MONO_CONTEXT
MONO_CONTEXT_GET_CURRENT (info->client_info.ctx);
+#elif defined (HOST_WASM)
+ //nothing
#else
g_error ("Sgen STW requires a working mono-context");
#endif
#else
g_error ("Sgen STW requires a working mono-context");
#endif
@@
-104,11
+106,11
@@
sgen_client_stop_world (int generation)
{
TV_DECLARE (end_handshake);
{
TV_DECLARE (end_handshake);
-
mono_profiler_gc_event (MONO_GC_EVENT_PRE_STOP_WORLD, generation
);
+
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_PRE_STOP_WORLD, generation)
);
acquire_gc_locks ();
acquire_gc_locks ();
-
mono_profiler_gc_event (MONO_GC_EVENT_PRE_STOP_WORLD_LOCKED, generation
);
+
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_PRE_STOP_WORLD_LOCKED, generation)
);
/* We start to scan after locks are taking, this ensures we won't be interrupted. */
sgen_process_togglerefs ();
/* We start to scan after locks are taking, this ensures we won't be interrupted. */
sgen_process_togglerefs ();
@@
-123,7
+125,7
@@
sgen_client_stop_world (int generation)
SGEN_LOG (3, "world stopped");
SGEN_LOG (3, "world stopped");
-
mono_profiler_gc_event (MONO_GC_EVENT_POST_STOP_WORLD, generation
);
+
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_POST_STOP_WORLD, generation)
);
TV_GETTIME (end_handshake);
time_stop_world += TV_ELAPSED (stop_world_time, end_handshake);
TV_GETTIME (end_handshake);
time_stop_world += TV_ELAPSED (stop_world_time, end_handshake);
@@
-143,10
+145,10
@@
sgen_client_restart_world (int generation, gint64 *stw_time)
/* notify the profiler of the leftovers */
/* FIXME this is the wrong spot at we can STW for non collection reasons. */
/* notify the profiler of the leftovers */
/* FIXME this is the wrong spot at we can STW for non collection reasons. */
- if (
G_UNLIKELY (mono_profiler_events & MONO_PROFILE_GC_MOVES
))
+ if (
MONO_PROFILER_ENABLED (gc_moves
))
mono_sgen_gc_event_moves ();
mono_sgen_gc_event_moves ();
-
mono_profiler_gc_event (MONO_GC_EVENT_PRE_START_WORLD, generation
);
+
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_PRE_START_WORLD, generation)
);
FOREACH_THREAD (info) {
info->client_info.stack_start = NULL;
FOREACH_THREAD (info) {
info->client_info.stack_start = NULL;
@@
-165,7
+167,7
@@
sgen_client_restart_world (int generation, gint64 *stw_time)
SGEN_LOG (2, "restarted (pause time: %d usec, max: %d)", (int)usec, (int)max_pause_usec);
SGEN_LOG (2, "restarted (pause time: %d usec, max: %d)", (int)usec, (int)max_pause_usec);
-
mono_profiler_gc_event (MONO_GC_EVENT_POST_START_WORLD, generation
);
+
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_POST_START_WORLD, generation)
);
/*
* We must release the thread info suspend lock after doing
/*
* We must release the thread info suspend lock after doing
@@
-179,7
+181,7
@@
sgen_client_restart_world (int generation, gint64 *stw_time)
*/
release_gc_locks ();
*/
release_gc_locks ();
-
mono_profiler_gc_event (MONO_GC_EVENT_POST_START_WORLD_UNLOCKED, generation
);
+
MONO_PROFILER_RAISE (gc_event, (MONO_GC_EVENT_POST_START_WORLD_UNLOCKED, generation)
);
*stw_time = usec;
}
*stw_time = usec;
}