6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14

Disable escape analysis when jvmti/debugger is used. Add support for EA ibto SA.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2009-06-09 16:19:10 -07:00
parent 0429abd38a
commit 7b9d6a79ac
22 changed files with 350 additions and 33 deletions

View file

@ -190,7 +190,7 @@ GrowableArray<MonitorInfo*>* compiledVFrame::monitors() const {
// 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*>* compiledVFrame::monitors() const {
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;
}