From 98ece1e8cf35d0194dbf0b16213144d9c9252f8a Mon Sep 17 00:00:00 2001 From: Mark Probst Date: Wed, 30 Mar 2016 14:05:28 -0700 Subject: [PATCH] [sgen] Fix major collection time accounting. This was from when we did a nursery collection as part of the finishing collection pause. Now that we don't do that anymore, we underaccount major collection times. --- mono/sgen/sgen-gc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mono/sgen/sgen-gc.c b/mono/sgen/sgen-gc.c index d4240da9bfe..97ed6b0e08c 100644 --- a/mono/sgen/sgen-gc.c +++ b/mono/sgen/sgen-gc.c @@ -288,9 +288,6 @@ static guint64 time_max = 0; static SGEN_TV_DECLARE (time_major_conc_collection_start); static SGEN_TV_DECLARE (time_major_conc_collection_end); -static SGEN_TV_DECLARE (last_minor_collection_start_tv); -static SGEN_TV_DECLARE (last_minor_collection_end_tv); - int gc_debug_level = 0; FILE* gc_debug_file; @@ -1476,6 +1473,8 @@ collect_nursery (const char *reason, gboolean is_overflow, SgenGrayQueue *unpin_ ScanCopyContext ctx; TV_DECLARE (atv); TV_DECLARE (btv); + SGEN_TV_DECLARE (last_minor_collection_start_tv); + SGEN_TV_DECLARE (last_minor_collection_end_tv); if (disable_minor_collections) return TRUE; @@ -2179,7 +2178,7 @@ major_finish_concurrent_collection (gboolean forced) sgen_gray_object_queue_dispose (&gc_thread_gray_queue); TV_GETTIME (total_end); - gc_stats.major_gc_time += TV_ELAPSED (total_start, total_end) - TV_ELAPSED (last_minor_collection_start_tv, last_minor_collection_end_tv); + gc_stats.major_gc_time += TV_ELAPSED (total_start, total_end); current_collection_generation = -1; } -- 2.25.1