JDK-8027450 : Improve time reporting in G1 remark
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs25,8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-10-29
  • Updated: 2015-06-03
  • Resolved: 2014-09-23
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 b34Fixed
Related Reports
Relates :  
Description
The G1 remark pause does not give much information about the various stages of processing, yet it sometimes takes a significant amount of time.

Currently, even with -XX:+PrintGCDetails the output is as follows:

536.310: [GC remark 536.323: [GC ref-proc, 0.0580120 secs], 0.2352880 secs]

As shown, in the whole GC remark pause, only reference processing is explicitly mentioned, however the remark pause has more stages, in particular the actual remark, the mentioned reference processing, string and symbol table unlink and some statistics phase.

Provide this information, eg. at least like in the following example:

[GC remark [GC graph-trace, 0.0095070 secs] [GC ref-proc, 0.0151560 secs] [GC string-unlink, 0.0211210 secs] [GC symbol-unlink, 0.0635730 secs] [GC aggregate-data, 0.0102910 secs], 0.1199190 secs]

It may be nice to allow breaking down the parallel phases in per-thread times.

Useful for diagnosing remark pause time.
Comments
The code snippet + if (G1Log::finer()) { + gclog_or_tty->put(' '); + } is repeated a lot. As StefanK mentioned, at least some parts of this has already been implemented. That patch also contains a way to fix the code repetition.
18-09-2014

I'm not sure what Thomas means by duplicate code in the patch.
18-09-2014

Some parts of this have already been implemented as a part of the G1 Class Unloading project.
17-09-2014

Attached is a patch that generates the example output shown above. It should be cleaned up (extracting duplicate code) first though.
31-10-2013