8154955: Negative Other Time in gc logs due to 'Wait for Root Region Scan' not included
authortschatzl
Mon, 02 May 2016 17:45:19 +0200
changeset 38167 f89f2032196c
parent 38161 1c7dd1e39fcf
child 38168 f70562200559
8154955: Negative Other Time in gc logs due to 'Wait for Root Region Scan' not included Summary: Move the note_gc_start() call before the wait_for_root_region_scanning() one. Reviewed-by: kbarrett, tschatzl Contributed-by: Yu Zhang <yu.zhang@oracle.com>
hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon May 02 14:14:16 2016 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Mon May 02 17:45:19 2016 +0200
@@ -3106,6 +3106,8 @@
   SvcGCMarker sgcm(SvcGCMarker::MINOR);
   ResourceMark rm;
 
+  g1_policy()->note_gc_start();
+
   wait_for_root_region_scanning();
 
   print_heap_before_gc();
@@ -3165,8 +3167,6 @@
                                                                   Threads::number_of_non_daemon_threads());
     workers()->set_active_workers(active_workers);
 
-    g1_policy()->note_gc_start();
-
     TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
     TraceMemoryManagerStats tms(false /* fullGC */, gc_cause());