JDK-8248221 : G1: millis_since_last_gc updated at wrong time
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 16
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2020-06-24
  • Updated: 2020-07-06
  • Resolved: 2020-07-06
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 16
16Resolved
Related Reports
Blocks :  
Blocks :  
Duplicate :  
Description
Documentation of the sun.rmi.transport.GC.maxObjectInspectionAge() method which calls millis_since_last_gc:

    /**
     * Returns the maximum <em>object-inspection age</em>, which is the number
     * of real-time milliseconds that have elapsed since the
     * least-recently-inspected heap object was last inspected by the garbage
     * collector.
     *
     * <p> For simple stop-the-world collectors this value is just the time
     * since the most recent collection.  For generational collectors it is the
     * time since the oldest generation was most recently collected.  Other
     * collectors are free to return a pessimistic estimate of the elapsed
     * time, or simply the time since the last full collection was performed.
     *
     * <p> Note that in the presence of reference objects, a given object that
     * is no longer strongly reachable may have to be inspected multiple times
     * before it can be reclaimed.
     */

Which means that the way G1 updated this has been wrong as we currently update it for young gcs only.
Comments
JDK-8248401 changes the whole mechanism to make this change obsolete
06-07-2020

Ignoring the second paragraph, this probably means that it expects the update after a full mark (either concurrently or stw).
24-06-2020