8226699: [BACKOUT] JDK-8221734 Deoptimize with handshakes

Reviewed-by: dholmes, rehn, dlong
This commit is contained in:
Daniel D. Daugherty 2019-06-24 22:38:17 -04:00
parent 01c739c34a
commit d6be015b16
28 changed files with 175 additions and 274 deletions

View file

@ -628,29 +628,6 @@ static void post_class_revocation_event(EventBiasedLockClassRevocation* event, K
event->commit();
}
BiasedLocking::Condition BiasedLocking::revoke_own_locks_in_handshake(Handle obj, TRAPS) {
markOop mark = obj->mark();
if (!mark->has_bias_pattern()) {
return NOT_BIASED;
}
Klass *k = obj->klass();
markOop prototype_header = k->prototype_header();
assert(mark->biased_locker() == THREAD &&
prototype_header->bias_epoch() == mark->bias_epoch(), "Revoke failed, unhandled biased lock state");
ResourceMark rm;
log_info(biasedlocking)("Revoking bias by walking my own stack:");
EventBiasedLockSelfRevocation event;
BiasedLocking::Condition cond = revoke_bias(obj(), false, false, (JavaThread*) THREAD, NULL);
((JavaThread*) THREAD)->set_cached_monitor_info(NULL);
assert(cond == BIAS_REVOKED, "why not?");
if (event.should_commit()) {
post_self_revocation_event(&event, k);
}
return cond;
}
BiasedLocking::Condition BiasedLocking::revoke_and_rebias(Handle obj, bool attempt_rebias, TRAPS) {
assert(!SafepointSynchronize::is_at_safepoint(), "must not be called while at safepoint");