RFR: JDK-8272065: jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416

Thomas Stuefe stuefe at openjdk.java.net
Fri Nov 5 05:19:15 UTC 2021


On Thu, 4 Nov 2021 17:02:05 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> `VM.metaspace`, `VM.classloaders` and `VM.class_hierarchy` all print out reflection invocation targets for delegating reflection class loaders. Post JEP 416 we don't use DelegatingClassLoaders anymore.
>> 
>> This patch removes the display of reflection targets from these commands as well as associated helper code and tests.
>> 
>> I don't have enough time atm to reimplement this feature using method handles. But at least we can remove the old code, and prepare the way for more code removal.
>> 
>> The patch does not touch vmClasses, `reflect_ConstructorAccessor` and `reflect_MethodAccessor` are both still there.
>> 
>> Tests: GHAs, manually testing the commands.
>
> Looks good to me.   Thanks for following this up.    The new implementation does not spin any new class loader and so I don't think jcmd needs to extend its support for the new implementation using method handles.

Thanks @mlchung, @coleenp and @dholmes-ora.

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

PR: https://git.openjdk.java.net/jdk/pull/6257


More information about the serviceability-dev mailing list