RFR: 8264644: Add PrintClassLoaderDataGraphAtExit to print the detailed CLD graph [v2]
Yi Yang
yyang at openjdk.java.net
Tue Apr 6 02:32:27 UTC 2021
On Tue, 6 Apr 2021 01:43:40 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> new flag PrintClassLoaderDataGraphAtExit
>
> src/hotspot/share/oops/method.cpp line 2260:
>
>> 2258: void Method::print_jmethod_ids(const ClassLoaderData* loader_data, outputStream* out) {
>> 2259: out->print("%d", loader_data->jmethod_ids()->count_methods());
>> 2260: }
>
> This method is pointless if it only prints the count to the stream without any descriptive text. Just delete it and print the method count directly in the caller.
The type of jmethod_ids is JNIMethodBlock, which is declared in `method.cpp`, we have to access its internal fields via print_jmethod_ids that declared in `method.hpp`. But if we only want to show jmethod_ids's address, then we can remove Method::print_jmethod_ids and print it directly. I'm not sure if others think jmethod_ids._count is important for their debugging, so I keep unchanged :)
-------------
PR: https://git.openjdk.java.net/jdk/pull/3323
More information about the hotspot-dev
mailing list