https://github.com/openjdk/jdk/blob/7d58978f62bf333f256115d6592706d70144ad15/src/hotspot/share/cds/archiveBuilder.cpp#L705-L729
The functions ArchiveBuilder::relocate_roots() and ArchiveBuilder::relocate_vm_classes() walk over global roots such as vmClasses::_klasses[] and Universe::_typeArrayKlassObjs[] and modify their contents to point to locations inside the CDS "buffer" space.
As a result, the VM is no longer usable after CDS dumping has finished.
Previously, we tried to save some of the VM states and restore them after CDS dump has finished. SeeJDK-8264735
However, this is too cumbersome and doesn't cover all cases. The intention of the global root relocation is to make it easy to write the roots using WriteClosure::do_ptr(). However, we can move the relocation logic inside WriteClosure::do_ptr() so that we don't need to modify the global VM state.
(This RFE is a prerequisite toJDK-8306582)
The functions ArchiveBuilder::relocate_roots() and ArchiveBuilder::relocate_vm_classes() walk over global roots such as vmClasses::_klasses[] and Universe::_typeArrayKlassObjs[] and modify their contents to point to locations inside the CDS "buffer" space.
As a result, the VM is no longer usable after CDS dumping has finished.
Previously, we tried to save some of the VM states and restore them after CDS dump has finished. See
However, this is too cumbersome and doesn't cover all cases. The intention of the global root relocation is to make it easy to write the roots using WriteClosure::do_ptr(). However, we can move the relocation logic inside WriteClosure::do_ptr() so that we don't need to modify the global VM state.
(This RFE is a prerequisite to
- relates to
-
JDK-8306582 Remove MetaspaceShared::exit_after_static_dump()
-
- Resolved
-
-
JDK-8308236 Remove SystemDictionaryShared::clone_dumptime_tables()
-
- Resolved
-