src/share/vm/classfile/classFileParser.cpp

changeset 2777
8ce625481709
parent 2743
758ba0bf7bcc
child 2983
498c6cf70f7e
     1.1 --- a/src/share/vm/classfile/classFileParser.cpp	Thu Apr 14 23:06:33 2011 -0400
     1.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Fri Apr 15 09:36:28 2011 -0400
     1.3 @@ -2196,11 +2196,12 @@
     1.4                                                TRAPS) {
     1.5    typeArrayHandle nullHandle;
     1.6    int length = methods()->length();
     1.7 -  // If JVMTI original method ordering is enabled we have to
     1.8 +  // If JVMTI original method ordering or sharing is enabled we have to
     1.9    // remember the original class file ordering.
    1.10    // We temporarily use the vtable_index field in the methodOop to store the
    1.11    // class file index, so we can read in after calling qsort.
    1.12 -  if (JvmtiExport::can_maintain_original_method_order()) {
    1.13 +  // Put the method ordering in the shared archive.
    1.14 +  if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
    1.15      for (int index = 0; index < length; index++) {
    1.16        methodOop m = methodOop(methods->obj_at(index));
    1.17        assert(!m->valid_vtable_index(), "vtable index should not be set");
    1.18 @@ -2214,8 +2215,9 @@
    1.19                                methods_parameter_annotations(),
    1.20                                methods_default_annotations());
    1.21  
    1.22 -  // If JVMTI original method ordering is enabled construct int array remembering the original ordering
    1.23 -  if (JvmtiExport::can_maintain_original_method_order()) {
    1.24 +  // If JVMTI original method ordering or sharing is enabled construct int
    1.25 +  // array remembering the original ordering
    1.26 +  if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
    1.27      typeArrayOop new_ordering = oopFactory::new_permanent_intArray(length, CHECK_(nullHandle));
    1.28      typeArrayHandle method_ordering(THREAD, new_ordering);
    1.29      for (int index = 0; index < length; index++) {

mercurial