On Tue, 15 Sep 2026 17:08:29 GMT, Dan Heidinga <[email protected]> wrote:

> [Picking up and finishing off https://github.com/openjdk/jdk/pull/32519 for 
> Coleen]
> 
> Remove the upcall to addClass during class loading. The comment says it's 
> only so GC can keep classes alive while the class loader is alive. We have 
> other ways to do that. There were some JVMTI tests in the past that failed 
> without this vector but today seems to be only one test. Maybe there's some 
> code that has a dependency on this in heap walking.
> Tested tier1-6
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Dan, thank you for taking this! It looks good to me. I've posted just one nit.
Big thanks to Coleen for all this work!

test/hotspot/jtreg/serviceability/jvmti/FollowReferences/ClassLoader/libClassLoaderTest.cpp
 line 38:

> 36:     printf("jvm->GetEnv failed\n");
> 37:     fflush(nullptr);
> 38:     return JNI_ERR;

Nit: LOG macro can be used (as at the line 65). Then `fflush()` call is not 
needed.

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

Marked as reviewed by sspitsyn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/32890#pullrequestreview-5217702028
PR Review Comment: https://git.openjdk.org/jdk/pull/32890#discussion_r4021833748

Reply via email to