--- a/src/hotspot/share/runtime/thread.cpp Wed Oct 02 13:57:03 2019 -0400
+++ b/src/hotspot/share/runtime/thread.cpp Wed Oct 02 16:55:08 2019 -0700
@@ -4185,7 +4185,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 || DynamicDumpSharedSpaces) {
+ if (Arguments::is_dumping_archive()) {
if(!agent->is_instrument_lib()) {
vm_exit_during_cds_dumping("CDS dumping does not support native JVMTI agent, name", agent->name());
} else if (!AllowArchivingWithJavaAgent) {