[sgen] Fix major collection time accounting.
authorMark Probst <mark.probst@gmail.com>
Wed, 30 Mar 2016 21:05:28 +0000 (14:05 -0700)
committerMark Probst <mark.probst@gmail.com>
Mon, 25 Jul 2016 18:06:55 +0000 (11:06 -0700)
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

index d4240da9bfecafd5c04f3068afb840d46052f5e6..97ed6b0e08cc7eb1390dc14bd74c8a3a0bd17d18 100644 (file)
@@ -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;
 }