United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7163848 G1: Log GC Cause for a GC
JDK-7163848 : G1: Log GC Cause for a GC

Details
Type:
Enhancement
Submit Date:
2012-04-24
Status:
Closed
Updated Date:
2013-06-07
Project Name:
JDK
Resolved Date:
2012-05-04
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs24
Fixed Versions:
hs24 (b09)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

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
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]
                                     
2012-04-24
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/48fac5d60c3c
                                     
2012-06-29
Verified by Mikael Gerdin in: HS24 b09, 8 b37 
                                     
2013-06-07
EVALUATION

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

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



Hardware and Software, Engineered to Work Together