7170053: crash in C2 when using -XX:+CountCompiledCalls
Reviewed-by: kvn, twisti
Contributed-by: Krystal Mok <sajia@taobao.com>
--- 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);