RFR: 8337658: ZGC: Move soft reference handling out of the driver loop function

Joel Sikström duke at openjdk.org
Thu Aug 1 12:58:30 UTC 2024


On Thu, 1 Aug 2024 12:19:04 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> The ZDriver code is written to be neat and have a clear outline. The soft reference handling distracts when reading this code. I propose that we hide it a bit.
> 
> I've also clarified in comments and names that the code is dealing with clearing of *all* references.

I think this change is good and agree that `ZDriverMajor::run_thread()` becomes easier to read. Since the policy is now read and set in the construction of the `ZDriverScopeMajor`, a new getter is needed from `ZGenerationOld` and in turn `ZReferenceProcessor` to retrieve the policy for the gc request. The naming clarifications seem appropriate.

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

PR Comment: https://git.openjdk.org/jdk/pull/20418#issuecomment-2262971897


More information about the hotspot-gc-dev mailing list