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

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
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.

Verified by Mikael Gerdin in HS24 b11, 8 b39

EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/1096fc5a52eb

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

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

SUGGESTED FIX Set the GC cause using an instance of the GCCauseSetter class.

EVALUATION GC cause not being set when a full GC is invoked from VM_G1CollectForAllocation