--- a/src/hotspot/share/runtime/thread.cpp Fri May 17 10:48:02 2019 -0400
+++ b/src/hotspot/share/runtime/thread.cpp Fri May 17 08:29:55 2019 -0700
@@ -3964,10 +3964,8 @@
SystemDictionary::compute_java_loaders(CHECK_JNI_ERR);
#if INCLUDE_CDS
- if (DumpSharedSpaces) {
- // capture the module path info from the ModuleEntryTable
- ClassLoader::initialize_module_path(THREAD);
- }
+ // capture the module path info from the ModuleEntryTable
+ ClassLoader::initialize_module_path(THREAD);
#endif
#if INCLUDE_JVMCI
@@ -4169,7 +4167,7 @@
for (agent = Arguments::agents(); agent != NULL; agent = agent->next()) {
// CDS dumping does not support native JVMTI agent.
// CDS dumping supports Java agent if the AllowArchivingWithJavaAgent diagnostic option is specified.
- if (DumpSharedSpaces) {
+ if (DumpSharedSpaces || DynamicDumpSharedSpaces) {
if(!agent->is_instrument_lib()) {
vm_exit_during_cds_dumping("CDS dumping does not support native JVMTI agent, name", agent->name());
} else if (!AllowArchivingWithJavaAgent) {