src/hotspot/share/oops/instanceKlass.cpp
changeset 53904 9c3fe09f69bc
parent 53884 1a7b57d02107
child 54257 21702e87efdf
equal deleted inserted replaced
53903:68bbd727dd5f 53904:9c3fe09f69bc
  2915 #if INCLUDE_JVMTI
  2915 #if INCLUDE_JVMTI
  2916 // update default_methods for redefineclasses for methods that are
  2916 // update default_methods for redefineclasses for methods that are
  2917 // not yet in the vtable due to concurrent subclass define and superinterface
  2917 // not yet in the vtable due to concurrent subclass define and superinterface
  2918 // redefinition
  2918 // redefinition
  2919 // Note: those in the vtable, should have been updated via adjust_method_entries
  2919 // Note: those in the vtable, should have been updated via adjust_method_entries
  2920 void InstanceKlass::adjust_default_methods(InstanceKlass* holder, bool* trace_name_printed) {
  2920 void InstanceKlass::adjust_default_methods(bool* trace_name_printed) {
  2921   // search the default_methods for uses of either obsolete or EMCP methods
  2921   // search the default_methods for uses of either obsolete or EMCP methods
  2922   if (default_methods() != NULL) {
  2922   if (default_methods() != NULL) {
  2923     for (int index = 0; index < default_methods()->length(); index ++) {
  2923     for (int index = 0; index < default_methods()->length(); index ++) {
  2924       Method* old_method = default_methods()->at(index);
  2924       Method* old_method = default_methods()->at(index);
  2925       if (old_method == NULL || old_method->method_holder() != holder || !old_method->is_old()) {
  2925       if (old_method == NULL || !old_method->is_old()) {
  2926         continue; // skip uninteresting entries
  2926         continue; // skip uninteresting entries
  2927       }
  2927       }
  2928       assert(!old_method->is_deleted(), "default methods may not be deleted");
  2928       assert(!old_method->is_deleted(), "default methods may not be deleted");
  2929 
  2929       Method* new_method = old_method->get_new_method();
  2930       Method* new_method = holder->method_with_idnum(old_method->orig_method_idnum());
       
  2931 
       
  2932       assert(new_method != NULL, "method_with_idnum() should not be NULL");
       
  2933       assert(old_method != new_method, "sanity check");
       
  2934 
       
  2935       default_methods()->at_put(index, new_method);
  2930       default_methods()->at_put(index, new_method);
       
  2931 
  2936       if (log_is_enabled(Info, redefine, class, update)) {
  2932       if (log_is_enabled(Info, redefine, class, update)) {
  2937         ResourceMark rm;
  2933         ResourceMark rm;
  2938         if (!(*trace_name_printed)) {
  2934         if (!(*trace_name_printed)) {
  2939           log_info(redefine, class, update)
  2935           log_info(redefine, class, update)
  2940             ("adjust: klassname=%s default methods from name=%s",
  2936             ("adjust: klassname=%s default methods from name=%s",