JDK-7163848 : G1: Log GC Cause for a GC
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs24
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-04-24
  • Updated: 2013-09-18
  • Resolved: 2012-05-04
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 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
Related Reports
Relates :  
Description
It would be much simpler to figure out why a GC happens if the GC cause was part of the information logged for each GC.

Just recently we were debugging a case where G1 was doing a lot of full GCs when running Eclipse. It turned out that the GCs where caused by perm gen running out of memory. This would have been much faster to find out if this was part of the logging.

Comments
Verified by Mikael Gerdin in: HS24 b09, 8 b37
07-06-2013

EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/48fac5d60c3c
29-06-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/48fac5d60c3c
12-05-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/48fac5d60c3c
26-04-2012

EVALUATION Have a fix that will print this information as part of PrintGC: [GC pause (young) (G1 Evacuation Pause) 149M->118M(244M), 0.2433432 secs] [GC pause (young) (initial-mark) (G1 Evacuation Pause) 160M->128M(247M), 0.1768634 secs] [GC pause (young) (initial-mark) (G1 Humongous Allocation) 32M->32M(100M), 0.0104583 secs] [GC pause (mixed) (G1 Evacuation Pause) 128M->82M(256M), 0.5632070 secs] [Full GC (System.gc()) 417K->321K(100M), 0.0324733 secs] [Full GC (Permanent Generation Full) 285K->285K(7168K), 0.0270867 secs] [Full GC (Last ditch collection) 285K->275K(7168K), 0.0268307 secs] [Full GC (No GC)[GC concurrent-root-region-scan-end, 0.0007064]
24-04-2012