7170053: crash in C2 when using -XX:+CountCompiledCalls

Reviewed-by: kvn, twisti
This commit is contained in:
Krystal Mok 2012-05-18 12:20:24 -07:00 committed by Christian Thalinger
parent 285f7e0640
commit 100eb2036d

View file

@ -780,7 +780,7 @@ void Parse::count_compiled_calls(bool at_method_entry, bool is_inline) {
if( at_method_entry ) { if( at_method_entry ) {
// bump invocation counter if top method (for statistics) // bump invocation counter if top method (for statistics)
if (CountCompiledCalls && depth() == 1) { 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* adr1 = makecon(addr_type);
Node* adr2 = basic_plus_adr(adr1, adr1, in_bytes(methodOopDesc::compiled_invocation_counter_offset())); Node* adr2 = basic_plus_adr(adr1, adr1, in_bytes(methodOopDesc::compiled_invocation_counter_offset()));
increment_counter(adr2); increment_counter(adr2);