summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-05-02 08:43:08 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-05-02 14:43:43 +0300
commit199b23cf1c5676ff0f47b9e0d56167fbef0d6f81 (patch)
treecdf709ac87fe7262c7d2bcdf33480e751da24c27
parent3af192338fa46b8cd8300eccbcf3a699f84b30f8 (diff)
downloadbdwgc-199b23cf1c5676ff0f47b9e0d56167fbef0d6f81.tar.gz
Do not count time spent processing toggle-refs in stopped_mark
Reported world-stopped collection time should not include the time spent in GC_process_togglerefs(). * alloc.c [!GC_NO_FINALIZATION && !GC_TOGGLE_REFS_NOT_NEEDED && !NO_CLOCK] (GC_stopped_mark): Call GC_process_togglerefs() before GET_TIME(start_time).
-rw-r--r--alloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/alloc.c b/alloc.c
index b9e1b933..dbc8eabf 100644
--- a/alloc.c
+++ b/alloc.c
@@ -805,14 +805,14 @@ STATIC GC_bool GC_stopped_mark(GC_stop_func stop_func)
GC_cond_register_dynamic_libraries();
# endif
+# if !defined(GC_NO_FINALIZATION) && !defined(GC_TOGGLE_REFS_NOT_NEEDED)
+ GC_process_togglerefs();
+# endif
+
# ifndef NO_CLOCK
if (GC_PRINT_STATS_FLAG)
GET_TIME(start_time);
# endif
-
-# if !defined(GC_NO_FINALIZATION) && !defined(GC_TOGGLE_REFS_NOT_NEEDED)
- GC_process_togglerefs();
-# endif
# ifdef THREADS
if (GC_on_collection_event)
GC_on_collection_event(GC_EVENT_PRE_STOP_WORLD);