RFR: 8264644: Add PrintClassLoaderDataGraphAtExit to print the detailed CLD graph [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Fri Apr 2 16:40:27 UTC 2021
On Fri, 2 Apr 2021 16:15:11 GMT, Yi Yang <yyang at openjdk.org> wrote:
>> I was just using PrintSystemDictionaryAtExit and wanted to ignore the CLDG information, which is already quite verbose for this option, so there was a lot of scrolling.
>>
>> It's sort of a small change to add a nonproduct PrintClassLoaderDataGraphAtExit and use that to print the CLDG at exit and remove it from PrintSystemDictionaryAtExit. Then we can each get the info we want.
>
> While adding the new flag PrintSystemDictionaryAtExit, I found that we may have missed acquiring CLDGraph_lock in some places.
>
> https://github.com/openjdk/jdk/blob/177bc84fe861f93f51e6d8ab5bf0738f4009522a/src/hotspot/share/classfile/classLoaderDataGraph.cpp#L674-L676
>
> https://github.com/openjdk/jdk/blob/177bc84fe861f93f51e6d8ab5bf0738f4009522a/src/hotspot/share/memory/universe.cpp#L1129-L1131
>
> It seems they are neither at a safepoint nor owned the CLDGraph_lock?
>
> Thanks!
> Yang
Yes, I like the new option. You're correct. There should be a CLDG_lock at both Universe::verify and debug.cpp. The latter is only called from the debugger so I didn't know if adding the lock would break anything, the former should have the lock. If you don't mind adding these and retesting, while waiting for your second reviewer (who might be having a holiday weekend), that would be great. Thanks!
-------------
PR: https://git.openjdk.java.net/jdk/pull/3323
More information about the hotspot-dev
mailing list