7170053: crash in C2 when using -XX:+CountCompiledCalls
authortwisti
Fri, 18 May 2012 12:20:24 -0700
changeset 12741 9315df9ea655
parent 12740 fa38bd69a34b
child 12742 b055b648431a
7170053: crash in C2 when using -XX:+CountCompiledCalls Reviewed-by: kvn, twisti Contributed-by: Krystal Mok <sajia@taobao.com>
hotspot/src/share/vm/opto/doCall.cpp
--- a/hotspot/src/share/vm/opto/doCall.cpp	Fri May 18 15:50:09 2012 +0200
+++ b/hotspot/src/share/vm/opto/doCall.cpp	Fri May 18 12:20:24 2012 -0700
@@ -780,7 +780,7 @@
     if( at_method_entry ) {
       // bump invocation counter if top method (for statistics)
       if (CountCompiledCalls && depth() == 1) {
-        const TypeInstPtr* addr_type = TypeInstPtr::make(method());
+        const TypeOopPtr* addr_type = TypeOopPtr::make_from_constant(method());
         Node* adr1 = makecon(addr_type);
         Node* adr2 = basic_plus_adr(adr1, adr1, in_bytes(methodOopDesc::compiled_invocation_counter_offset()));
         increment_counter(adr2);