--- a/src/hotspot/share/runtime/thread.cpp Mon Oct 07 15:52:38 2019 +0200
+++ b/src/hotspot/share/runtime/thread.cpp Mon Oct 07 16:13:25 2019 +0200
@@ -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) {