G1 STW phases and FGC column in jstat

Yasumasa Suenaga yasuenag at gmail.com
Tue Mar 1 14:56:44 UTC 2016


Hi all,

I wonder that STW phases (Remark and Cleanup) at G1 are not counted in jstat FGC column.
For example, Initial Mark and Remark at CMS are counted as FGC.

For consistency, I think that G1 STW phases should be counted as FGC.
What do you think about it?

If it is accepted, I will file it to JBS and will upload webrev.


suggested fix:
----------------------
diff -r 8a103ba9a7b2 src/share/vm/gc/g1/g1MonitoringSupport.cpp
--- a/src/share/vm/gc/g1/g1MonitoringSupport.cpp	Mon Feb 29 22:54:24 2016 +0900
+++ b/src/share/vm/gc/g1/g1MonitoringSupport.cpp	Tue Mar 01 23:43:30 2016 +0900
@@ -103,7 +103,7 @@
   //   name "collector.1".  In a generational collector this would be the
   // old generation collection.
   _full_collection_counters =
-    new CollectorCounters("G1 stop-the-world full collections", 1);
+    new CollectorCounters("G1 stop-the-world phase", 1);
 
   // timer sampling for all counters supporting sampling only update the
   // used value.  See the take_sample() method.  G1 requires both used and
diff -r 8a103ba9a7b2 src/share/vm/gc/g1/vm_operations_g1.cpp
--- a/src/share/vm/gc/g1/vm_operations_g1.cpp	Mon Feb 29 22:54:24 2016 +0900
+++ b/src/share/vm/gc/g1/vm_operations_g1.cpp	Tue Mar 01 23:43:30 2016 +0900
@@ -230,6 +230,8 @@
   G1CollectedHeap* g1h = G1CollectedHeap::heap();
   GCTraceTime(Info, gc) t(_printGCMessage, g1h->gc_timer_cm(), GCCause::_no_gc, true);
   IsGCActiveMark x;
+  SvcGCMarker sgcm(SvcGCMarker::OTHER);
+  TraceCollectorStats tcs(g1h->g1mm()->full_collection_counters());
   _cl->do_void();
 }
 
----------------------


Thanks,

Yasumasa




More information about the hotspot-gc-dev mailing list