JDK-8151674 : STW phases at Concurrent GC should count in PerfCounter
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-03-11
  • Updated: 2018-06-21
  • Resolved: 2016-03-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b115Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2016-March/016774.html
http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2016-March/016896.html

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.
We discussed on hotspot-gc-dev for this issue, and I proposed to add new PerfCounter for CGC STW phases.

We can override jstat_options if we want to watch CGC counters.
Also we can check it through PerfCounter.print jcmd.

* hotspot: http://cr.openjdk.java.net/~ysuenaga/JDK-6291341/poc-2/hotspot/
* jdk: http://cr.openjdk.java.net/~ysuenaga/JDK-6291341/poc-2/jdk/

For compatibility, this patch works the same as the current by default.
If you set -XX:+EnableConcGCPerfCounter, CGC counter will work fine.
(I want to set +EnableConcGCPerfCounter by default)
Comments
See JDK-8153280 and JDK-8153283 for the failing tests. This fix will be backed out using JDK-8153302.
01-04-2016

For release notes. A jstat counter for pauses of a concurrent garbage collector are being added and will be listed by jstat under the CGC (concurrent GC) heading. The CMS (UseConcMarkSweepGC) initial mark pauses and remark pauses previously by jstat under the FGC (full GC) heading are now listed under CGC. Jstat counters for the G1 (UseG1GC) remark pauses and cleanup pauses have been added and will be listed by jstat under the CGC heading.
17-03-2016

Don't add G1 initial mark to the CGC counters. I'll fix the release note text.
17-03-2016

My patch will be count remark and cleanup phase to CGC at G1. Does not count G1 initial mark because initial mark at G1 is piggy-backed in YGC. Should I count G1 initial mark to CGC counter?
16-03-2016