8202035: Archive the set of ModuleDescriptor and ModuleReference objects for observable system modules with unnamed initial module

Support system module archiving with unnamed initial module at dump time.

Co-authored-by: Alan Bateman <alan.bateman@oracle.com>
Reviewed-by: erikj, coleenp, mchung, iklam, ccheung
This commit is contained in:
Jiangli Zhou 2018-07-08 12:43:05 -04:00
parent 4d93f17fe1
commit 9ba5bab865
25 changed files with 1473 additions and 32 deletions

View file

@ -39,6 +39,7 @@
#include "interpreter/bytecode.hpp"
#include "jfr/jfrEvents.hpp"
#include "logging/log.hpp"
#include "memory/heapShared.hpp"
#include "memory/oopFactory.hpp"
#include "memory/referenceType.hpp"
#include "memory/resourceArea.hpp"
@ -3598,6 +3599,13 @@ JVM_LEAF(jboolean, JVM_SupportsCX8())
return VM_Version::supports_cx8();
JVM_END
JVM_ENTRY(void, JVM_InitializeFromArchive(JNIEnv* env, jclass cls))
JVMWrapper("JVM_InitializeFromArchive");
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
assert(k->is_klass(), "just checking");
HeapShared::initialize_from_archived_subgraph(k);
JVM_END
// Returns an array of all live Thread objects (VM internal JavaThreads,
// jvmti agent threads, and JNI attaching threads are skipped)
// See CR 6404306 regarding JNI attaching threads