--- old/src/hotspot/share/classfile/classFileParser.cpp 2019-10-01 09:57:55.569440206 -0700 +++ new/src/hotspot/share/classfile/classFileParser.cpp 2019-10-01 09:57:55.010419464 -0700 @@ -3004,7 +3004,7 @@ // We temporarily use the vtable_index field in the Method* to store the // class file index, so we can read in after calling qsort. // Put the method ordering in the shared archive. - if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) { + if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces || DynamicDumpSharedSpaces) { for (int index = 0; index < length; index++) { Method* const m = methods->at(index); assert(!m->valid_vtable_index(), "vtable index should not be set"); @@ -3018,7 +3018,7 @@ intArray* method_ordering = NULL; // If JVMTI original method ordering or sharing is enabled construct int // array remembering the original ordering - if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) { + if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces || DynamicDumpSharedSpaces) { method_ordering = new intArray(length, length, -1); for (int index = 0; index < length; index++) { Method* const m = methods->at(index);