JDK-7168294 : G1: Some Full GCs incorrectly report GC cause as "No GC"
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Affected Version: 8
  • OS: generic
  • CPU: generic
  • Submit Date: 2012-05-11
  • Updated Date: 2013-09-18
  • Resolved Date: 2012-05-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 Availabitlity Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8Fixed
Description
During a recent G1 TOI, a GC log entry for a full GC was shown:

9.239: [Full GC (No GC) 128M->125M(128M), 9.0804393 secs]

which is showing "No GC" as the cause.

It turns out that this is incorrect and we have path in G1 where we do not set the GC cause.

Comments
Verified by Mikael Gerdin in HS24 b11, 8 b39
2013-06-11

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

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/1096fc5a52eb
2012-05-26

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/1096fc5a52eb
2012-05-15

SUGGESTED FIX Set the GC cause using an instance of the GCCauseSetter class.
2012-05-11

EVALUATION GC cause not being set when a full GC is invoked from VM_G1CollectForAllocation
2012-05-11