JDK-7098085 : G1: partially-young GCs not initiated under certain circumstances
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs23
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-10-05
  • Updated: 2013-10-04
  • Resolved: 2012-01-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
7u4Fixed 8Fixed hs23Fixed
Description
It looks as if G1 does not always initiate partially-young GCs after a concurrent marking cycle. The flag that initiates partially-young GCs is _last_full_young_gc (it means: the next GC will be the last young GC and we'll do partially-young ones after that) and it's set in record_concurrent_mark_cleanup_completed(). This is called at the end of concurrent cleanup:

      // Check if cleanup set the free_regions_coming flag. If it
      // hasn't, we can just skip the next step.
      if (g1h->free_regions_coming()) {
        ...

        _sts.join();
        g1_policy->record_concurrent_mark_cleanup_completed();
        _sts.leave();
      }

Note, however, that unfortunately it's only called if free_regions_coming() is true, which is only true if cleanup found totally empty regions to reclaim.

Many thanks to Thomas Schatzl for bringing this up.

Comments
EVALUATION See main CR
28-10-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/ec4b032a4977
14-10-2011

EVALUATION See Description.
05-10-2011