-
Enhancement
-
Resolution: Fixed
-
P3
-
11
-
b02
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8229329 | 11.0.5 | Jiangli Zhou | P3 | Resolved | Fixed | b03 |
Support archiving system module graph when the initial module is null (from -cp) currently.
Support G1 GC, 64-bit (non-Windows). Requires UseCompressedOops and UseCompressedClassPointers.
Dump time system module object archiving
=================================
At dump time, the following fields in ArchivedModuleGraph are set to record the system module information for archiving.
private static SystemModules archivedSystemModules;
private static ModuleFinder archivedSystemModuleFinder;
private static String archivedMainModule;
The archiving process starts from a given static field in ArchivedModuleGraph class instance (java mirror object). The process archives the complete network of java heap objects that are reachable directly or indirectly from the starting object by following references.
1. Starts from a given static field within the Class instance (java mirror). If the static field is a refererence field and points to a non-null java object, proceed to the next step. The static field and it's value is recorded and stored outside the archived mirror.
2. Archives the referenced java object. If an archived copy of the current object already exists, updates the pointer in the archived copy of the referencing object to point to the current archived object. Otherwise, proceed to the next step.
3. Follows all references within the current java object and recursively archive the sub-graph of objects starting from each reference encountered within the object.
4. Updates the pointer in the archived copy of referecing object to point to the current archived object.
5. The Klass of the current java object is added to a list of Klasses for loading and initializing before any object in the archived graph can be accessed at runtime.
Runtime initialization from archived system module objects
===============================
VM.initializeFromArchive(<class>) is called from ArchivedModuleGraph's static initializer to initialize from the archived module information. Klasses in the recorded list are loaded, linked and initialized. The static fields in ArchivedModuleGraph class instance are initialized using the archived field values. After initialization, the archived system module objects can be used directly.
If the archived java heap data is not successfully mapped at runtime, or there is an error during VM.initializeFromArchive(), then all static fields in ArchivedModuleGraph are not initialized. System ModuleDescriptor and ModuleReference objects are created as normal.
- backported by
-
JDK-8229329 Archive the set of ModuleDescriptor and ModuleReference objects for observable system modules with unnamed initial module
- Resolved
- relates to
-
JDK-8201650 Move iteration order randomization of unmodifiable Set and Map to iterators
- Resolved
-
JDK-8209120 Archive the Integer.IntegerCache
- Resolved
-
JDK-8194759 Support caching class mirror objects
- Closed
-
JDK-8210289 ArchivedKlassSubGraphInfoRecord is incomplete
- Resolved
-
JDK-8206009 Move CDS java heap object archiving code to heapShared.hpp and heapShared.cpp
- Resolved
-
JDK-8207263 Store the Configuration for system modules into CDS archive
- Resolved
-
JDK-8210388 Use hash table to store archived subgraph_info records
- Resolved
-
JDK-8207381 Provide internal Java API for archiving object sub-graph reachable from static field
- Closed
-
JDK-8207795 Change VM.initializeFromArchive() to return a boolean
- Closed
-
JDK-8210391 Add locking in HeapShared::initialize_from_archived_subgraph
- Closed
-
JDK-8214932 Implement more checks for archiving object subgraphs
- Closed