Mercurial > hg > graal-compiler
diff src/share/vm/runtime/vframe_hp.cpp @ 818:b109e761e927
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
Summary: Disable escape analysis when jvmti/debugger is used. Add support for EA ibto SA.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 09 Jun 2009 16:19:10 -0700 |
parents | d1605aabd0a1 |
children | bd02caa94611 9987d9d5eb0e |
line wrap: on
line diff
--- a/src/share/vm/runtime/vframe_hp.cpp Fri Jun 05 10:25:39 2009 -0700 +++ b/src/share/vm/runtime/vframe_hp.cpp Tue Jun 09 16:19:10 2009 -0700 @@ -190,7 +190,7 @@ // Casting away const frame& fr = (frame&) _fr; MonitorInfo* info = new MonitorInfo(fr.compiled_synchronized_native_monitor_owner(nm), - fr.compiled_synchronized_native_monitor(nm), false); + fr.compiled_synchronized_native_monitor(nm), false, false); monitors->push(info); return monitors; } @@ -201,8 +201,20 @@ GrowableArray<MonitorInfo*>* result = new GrowableArray<MonitorInfo*>(monitors->length()); for (int index = 0; index < monitors->length(); index++) { MonitorValue* mv = monitors->at(index); - StackValue *owner_sv = create_stack_value(mv->owner()); // it is an oop - result->push(new MonitorInfo(owner_sv->get_obj()(), resolve_monitor_lock(mv->basic_lock()), mv->eliminated())); + ScopeValue* ov = mv->owner(); + StackValue *owner_sv = create_stack_value(ov); // it is an oop + if (ov->is_object() && owner_sv->obj_is_scalar_replaced()) { // The owner object was scalar replaced + assert(mv->eliminated(), "monitor should be eliminated for scalar replaced object"); + // Put klass for scalar replaced object. + ScopeValue* kv = ((ObjectValue *)ov)->klass(); + assert(kv->is_constant_oop(), "klass should be oop constant for scalar replaced object"); + KlassHandle k(((ConstantOopReadValue*)kv)->value()()); + result->push(new MonitorInfo(k->as_klassOop(), resolve_monitor_lock(mv->basic_lock()), + mv->eliminated(), true)); + } else { + result->push(new MonitorInfo(owner_sv->get_obj()(), resolve_monitor_lock(mv->basic_lock()), + mv->eliminated(), false)); + } } return result; }