mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8229844: Remove attempt_rebias parameter from revoke_and_rebias()
Removed attempt_rebias parameter and merged fast_enter() and slow_enter() into enter() Reviewed-by: dholmes, rehn, coleenp, dcubed
This commit is contained in:
parent
702199983a
commit
85dbabe345
14 changed files with 125 additions and 249 deletions
|
@ -771,12 +771,7 @@ JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* thread, Ba
|
|||
Handle h_obj(thread, elem->obj());
|
||||
assert(Universe::heap()->is_in_reserved_or_null(h_obj()),
|
||||
"must be NULL or an object");
|
||||
if (UseBiasedLocking) {
|
||||
// Retry fast entry if bias is revoked to avoid unnecessary inflation
|
||||
ObjectSynchronizer::fast_enter(h_obj, elem->lock(), true, CHECK);
|
||||
} else {
|
||||
ObjectSynchronizer::slow_enter(h_obj, elem->lock(), CHECK);
|
||||
}
|
||||
ObjectSynchronizer::enter(h_obj, elem->lock(), CHECK);
|
||||
assert(Universe::heap()->is_in_reserved_or_null(elem->obj()),
|
||||
"must be NULL or an object");
|
||||
#ifdef ASSERT
|
||||
|
@ -796,7 +791,7 @@ JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorexit(JavaThread* thread, Bas
|
|||
if (elem == NULL || h_obj()->is_unlocked()) {
|
||||
THROW(vmSymbols::java_lang_IllegalMonitorStateException());
|
||||
}
|
||||
ObjectSynchronizer::slow_exit(h_obj(), elem->lock(), thread);
|
||||
ObjectSynchronizer::exit(h_obj(), elem->lock(), thread);
|
||||
// Free entry. This must be done here, since a pending exception might be installed on
|
||||
// exit. If it is not cleared, the exception handling code will try to unlock the monitor again.
|
||||
elem->set_obj(NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue