RFR: 8267281: Investigate calling MetaspaceShared::link_and_cleanup_shared_classes for jcmd dynamic_dump
Yumin Qi
minqi at openjdk.java.net
Fri Jul 9 02:51:08 UTC 2021
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
-------------
Commit messages:
- 8267281: Investigate calling MetaspaceShared::link_and_cleanup_shared_classes for jcmd dynamic_dump
Changes: https://git.openjdk.java.net/jdk/pull/4736/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4736&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8267281
Stats: 10 lines in 6 files changed: 1 ins; 0 del; 9 mod
Patch: https://git.openjdk.java.net/jdk/pull/4736.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4736/head:pull/4736
PR: https://git.openjdk.java.net/jdk/pull/4736
More information about the hotspot-dev
mailing list