8027632: assert(xtype->klass_is_exact()) failed: Should be exact at graphKit.cpp
authorroland
Tue, 12 Nov 2013 13:58:37 +0100
changeset 21576 e7cac8551ec2
parent 21575 6a9645992cee
child 21577 471d08cfc988
child 21579 c396d68f3e48
8027632: assert(xtype->klass_is_exact()) failed: Should be exact at graphKit.cpp Summary: receiver type collected by profiling for default method may be interface Reviewed-by: kvn, iveresov
hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Tue Nov 12 09:32:50 2013 +0100
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Tue Nov 12 13:58:37 2013 +0100
@@ -4338,6 +4338,11 @@
 #endif // PRODUCT
 
 void GraphBuilder::profile_call(ciMethod* callee, Value recv, ciKlass* known_holder, Values* obj_args, bool inlined) {
+  // A default method's holder is an interface
+  if (known_holder != NULL && known_holder->is_interface()) {
+    assert(known_holder->is_instance_klass() && ((ciInstanceKlass*)known_holder)->has_default_methods(), "should be default method");
+    known_holder = NULL;
+  }
   append(new ProfileCall(method(), bci(), callee, recv, known_holder, obj_args, inlined));
 }