1.1 --- a/src/share/vm/c1/c1_GraphBuilder.cpp Tue Jan 07 12:38:22 2014 +0100 1.2 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Tue Jan 07 14:36:34 2014 +0100 1.3 @@ -4338,11 +4338,15 @@ 1.4 #endif // PRODUCT 1.5 1.6 void GraphBuilder::profile_call(ciMethod* callee, Value recv, ciKlass* known_holder, Values* obj_args, bool inlined) { 1.7 - // A default method's holder is an interface 1.8 - if (known_holder != NULL && known_holder->is_interface()) { 1.9 - assert(known_holder->is_instance_klass() && ((ciInstanceKlass*)known_holder)->has_default_methods(), "should be default method"); 1.10 - known_holder = NULL; 1.11 + assert(known_holder == NULL || (known_holder->is_instance_klass() && 1.12 + (!known_holder->is_interface() || 1.13 + ((ciInstanceKlass*)known_holder)->has_default_methods())), "should be default method"); 1.14 + if (known_holder != NULL) { 1.15 + if (known_holder->exact_klass() == NULL) { 1.16 + known_holder = compilation()->cha_exact_type(known_holder); 1.17 + } 1.18 } 1.19 + 1.20 append(new ProfileCall(method(), bci(), callee, recv, known_holder, obj_args, inlined)); 1.21 } 1.22