RFR: 8267281: Investigate calling MetaspaceShared::link_and_cleanup_shared_classes for jcmd dynamic_dump [v2]
Ioi Lam
iklam at openjdk.java.net
Mon Jul 12 17:57:59 UTC 2021
On Fri, 9 Jul 2021 19:58:17 GMT, Yumin Qi <minqi at openjdk.org> wrote:
>> Hi, Please review
>>
>> When using 'jcmd VM.cds dynamic_dump' to dump dynamic archive, we did not call MetaspaceShared::link_and_cleanup_shared_classes, which is linking linkable shared classes before dump. The classes should be those loaded but not yet linked or loaded during verification. It also will regenerate the lambda form invoker holder classes (those recorded in static archive plus loaded during app run time). For static dump, a separate process spawned to dump the static archive, and for dynamic dump without using jcmd, after dump the process will exit, so this function only called once.
>> With jcmd, we can do multiple dumps to same live process (See bug 8264735) so we need to check if calling this function is safe (do not change runtime data consistency). The lambda form invoker holder classes will be generated every time this function is called either.
>> The function name is renamed to link_shared_classes, since the cleanup work is no longer done by this function.
>>
>> Tests: tier1,tier3,tier4 (going on to finish, without failure found).
>>
>> Thanks
>> Yumin
>
> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>
> Modified log message and test case for checking this message
LGTM, but I think the issue title should be changed to something like "call prepare_for_dynamic_dumping for jcmd dynamic_dump".
-------------
Marked as reviewed by iklam (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4736
More information about the hotspot-runtime-dev
mailing list