RFR: 8334060: Implementation of Late Barrier Expansion for G1 [v16]

halkosajtarevic duke at openjdk.org
Fri Sep 6 20:26:10 UTC 2024


On Fri, 6 Sep 2024 20:21:11 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> > > I was just thinking whether it is necessary to do these barriers for enums at all. They will most likely always reside in a different region/generation anyways, and will (but that may be wrong) never be collected.
> > 
> > 
> > As far as I understand, from a GC perspective enum instances are handled just like any other class instance, so I do not think there is any special GC barrier optimization opportunity for them. Maybe some GC expert can comment further on this or correct me if I am wrong.
> 
> @robcasloz is correct, the GCs don't have any special knowledge about enum instances. They are ordinary objects, though probably long-lived so will eventually migrate to the old generation. Trying to do anything special with them seems very unlikely to provide a benefit worth the costs involved.

Thank you very much for the insights!

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19746#issuecomment-2334756865


More information about the hotspot-dev mailing list