-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b10
When iterating over the ClassLoaderDataGraph and handing out CLDs, you sometimes need to make sure that the CLD and its oops are kept alive. I think it would be easy to think that you should call ClassLoaderData::keep_alive() to do that, just like we have CollectedHeap::keep_alive(oop). However, ClassLoaderData::keep_alive already exists and returns whether the CLD is forcefully kept alive or not. So, what you need to do today is to call ClassLoaderData::holder(), and that will keep the CLD alive.
I propose that we rename the current ClassLoaderData::keep_alive() to something else, and then use ClassLoaderData to apply the "keep alive" property.
I propose that we rename the current ClassLoaderData::keep_alive() to something else, and then use ClassLoaderData to apply the "keep alive" property.
- relates to
-
JDK-8326820 Metadata artificially kept alive
-
- Resolved
-
-
JDK-8280454 G1: ClassLoaderData verification keeps CLDs live that causes problems with VerifyDuringGC during Remark
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/328a0533
-
Review(master) openjdk/jdk/20408