On Fri, 28 Aug 2026 12:48:42 GMT, Alan Bateman <[email protected]> wrote:

> I worry this is a significant behavior change that will blind some heap 
> analysis tools. As part of "I'm still working on this", would you mind 
> looking into synthesizing these refs so that tools using FollowReferences 
> will follow refs to the loaded classes?

Rather than relying on the ArrayList of Class objects in ClassLoader to provide 
the reference links, can we update the  `VM_HeapWalkOperation` used by JVMTI 
FollowReferences to treat ClassLoaders specially?

The `VM_HeapWalkOperation::visit` operation in jvmtiTagMap.cpp can add a case 
for classloaders to iterate them specially:

if (klass->is_class_loader_instance_klass()) {
   return iterate_over_classloader(o);
}

where `iterate_over_classloader` fetches the ClassLoaderData and then iterates 
over its _klasses?

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

PR Comment: https://git.openjdk.org/jdk/pull/32519#issuecomment-5456302430

Reply via email to