RFR: 8335059: Consider renaming ClassLoaderData::keep_alive

Stefan Karlsson stefank at openjdk.org
Wed Jul 31 19:04:30 UTC 2024


On Wed, 31 Jul 2024 18:35:12 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> How does this rename look?  Instead of ClassLoaderData::keep_alive() and a _keep_alive refcount, it's been renamed to _strongly_reachable and is_strongly_reachable().
> Tested with tier1 on Oracle supported platforms.

There's a risk that someone incorrectly interprets:

- _strongly_reachable 0


to mean that the class loader isn't strongly reachable.

In the bug entry I suggested a name `_strong_count` and tried to avoid the word "reachable" because it already have a meaning for the GC. When talking about the "strong" property we both talk about strongly reachable and strong roots. The property for this CLD is that it is a strong root from the GC's perspective. Maybe we can use that instead. What do you think about 
`_strong_root` and `is_strong_root`? Or maybe even `_root` and `is_root`?

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

PR Comment: https://git.openjdk.org/jdk/pull/20408#issuecomment-2261207888


More information about the hotspot-dev mailing list