diff -r 5c83830390ba -r 319173c62caa src/hotspot/share/oops/klass.cpp --- a/src/hotspot/share/oops/klass.cpp Wed Oct 02 13:57:03 2019 -0400 +++ b/src/hotspot/share/oops/klass.cpp Wed Oct 02 16:55:08 2019 -0700 @@ -525,7 +525,7 @@ } void Klass::remove_unshareable_info() { - assert (DumpSharedSpaces || DynamicDumpSharedSpaces, + assert (Arguments::is_dumping_archive(), "only called during CDS dump time"); JFR_ONLY(REMOVE_ID(this);) if (log_is_enabled(Trace, cds, unshareable)) { @@ -543,7 +543,7 @@ } void Klass::remove_java_mirror() { - assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "only called during CDS dump time"); + Arguments::assert_is_dumping_archive(); if (log_is_enabled(Trace, cds, unshareable)) { ResourceMark rm; log_trace(cds, unshareable)("remove java_mirror: %s", external_name());