src/share/vm/prims/jvmtiRedefineClasses.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8014013 Sdiff src/share/vm/prims

src/share/vm/prims/jvmtiRedefineClasses.cpp

Print this page




2913 
2914       // obsolete methods need a unique idnum
2915       u2 num = InstanceKlass::cast(_the_class_oop)->next_method_idnum();
2916       if (num != ConstMethod::UNSET_IDNUM) {
2917 //      u2 old_num = old_method->method_idnum();
2918         old_method->set_method_idnum(num);
2919 // TO DO: attach obsolete annotations to obsolete method's new idnum
2920       }
2921       // With tracing we try not to "yack" too much. The position of
2922       // this trace assumes there are fewer obsolete methods than
2923       // EMCP methods.
2924       RC_TRACE(0x00000100, ("mark %s(%s) as obsolete",
2925         old_method->name()->as_C_string(),
2926         old_method->signature()->as_C_string()));
2927     }
2928     old_method->set_is_old();
2929   }
2930   for (int i = 0; i < _deleted_methods_length; ++i) {
2931     Method* old_method = _deleted_methods[i];
2932 
2933     assert(old_method->vtable_index() < 0,
2934            "cannot delete methods with vtable entries");;
2935 
2936     // Mark all deleted methods as old and obsolete
2937     old_method->set_is_old();
2938     old_method->set_is_obsolete();
2939     ++obsolete_count;
2940     // With tracing we try not to "yack" too much. The position of
2941     // this trace assumes there are fewer obsolete methods than
2942     // EMCP methods.
2943     RC_TRACE(0x00000100, ("mark deleted %s(%s) as obsolete",
2944                           old_method->name()->as_C_string(),
2945                           old_method->signature()->as_C_string()));
2946   }
2947   assert((*emcp_method_count_p + obsolete_count) == _old_methods->length(),
2948     "sanity check");
2949   RC_TRACE(0x00000100, ("EMCP_cnt=%d, obsolete_cnt=%d", *emcp_method_count_p,
2950     obsolete_count));
2951 }
2952 
2953 // This internal class transfers the native function registration from old methods




2913 
2914       // obsolete methods need a unique idnum
2915       u2 num = InstanceKlass::cast(_the_class_oop)->next_method_idnum();
2916       if (num != ConstMethod::UNSET_IDNUM) {
2917 //      u2 old_num = old_method->method_idnum();
2918         old_method->set_method_idnum(num);
2919 // TO DO: attach obsolete annotations to obsolete method's new idnum
2920       }
2921       // With tracing we try not to "yack" too much. The position of
2922       // this trace assumes there are fewer obsolete methods than
2923       // EMCP methods.
2924       RC_TRACE(0x00000100, ("mark %s(%s) as obsolete",
2925         old_method->name()->as_C_string(),
2926         old_method->signature()->as_C_string()));
2927     }
2928     old_method->set_is_old();
2929   }
2930   for (int i = 0; i < _deleted_methods_length; ++i) {
2931     Method* old_method = _deleted_methods[i];
2932 
2933     assert(!old_method->has_vtable_index(),
2934            "cannot delete methods with vtable entries");;
2935 
2936     // Mark all deleted methods as old and obsolete
2937     old_method->set_is_old();
2938     old_method->set_is_obsolete();
2939     ++obsolete_count;
2940     // With tracing we try not to "yack" too much. The position of
2941     // this trace assumes there are fewer obsolete methods than
2942     // EMCP methods.
2943     RC_TRACE(0x00000100, ("mark deleted %s(%s) as obsolete",
2944                           old_method->name()->as_C_string(),
2945                           old_method->signature()->as_C_string()));
2946   }
2947   assert((*emcp_method_count_p + obsolete_count) == _old_methods->length(),
2948     "sanity check");
2949   RC_TRACE(0x00000100, ("EMCP_cnt=%d, obsolete_cnt=%d", *emcp_method_count_p,
2950     obsolete_count));
2951 }
2952 
2953 // This internal class transfers the native function registration from old methods


src/share/vm/prims/jvmtiRedefineClasses.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File