RFR: 8335059: Consider renaming ClassLoaderData::keep_alive [v2]
David Holmes
dholmes at openjdk.org
Thu Aug 1 05:16:35 UTC 2024
On Wed, 31 Jul 2024 20:41:47 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.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Rename to keep_alive_ref_count
At the moment the changes do not at all match the PR description, and while the renaming adds a little clarity it doesn't seem to address any concerns one might have had with "keep alive" as a terminology.
> I want the attribute to tell me that GC can't unload this CLD!
Maybe `disable_unload_count`?
src/hotspot/share/classfile/classLoaderDataGraph.cpp line 313:
> 311: while (ClassLoaderData* cld = iter.get_next()) {
> 312: // Keep the holder alive.
> 313: cld->keep_alive();
Does comment need changing or removing?
src/hotspot/share/classfile/classLoaderDataGraph.cpp line 338:
> 336: while (ClassLoaderData* cld = iter.get_next()) {
> 337: // Keep the holder alive.
> 338: cld->keep_alive();
Ditto re comment
-------------
PR Review: https://git.openjdk.org/jdk/pull/20408#pullrequestreview-2211633655
PR Review Comment: https://git.openjdk.org/jdk/pull/20408#discussion_r1699427472
PR Review Comment: https://git.openjdk.org/jdk/pull/20408#discussion_r1699427605
More information about the hotspot-dev
mailing list