# HG changeset patch # User twisti # Date 1337368824 25200 # Node ID cdd249497b34680ad0aff5f9784f930323a9623a # Parent 4073d9478a904b9d6ee620068b40aad9afc76893 7170053: crash in C2 when using -XX:+CountCompiledCalls Reviewed-by: kvn, twisti Contributed-by: Krystal Mok diff -r 4073d9478a90 -r cdd249497b34 src/share/vm/opto/doCall.cpp --- a/src/share/vm/opto/doCall.cpp Fri May 18 15:50:09 2012 +0200 +++ b/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);