mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8291555: Implement alternative fast-locking scheme
Co-authored-by: Fei Yang <fyang@openjdk.org> Co-authored-by: Thomas Stuefe <stuefe@openjdk.org> Reviewed-by: dcubed, stuefe, shade, dholmes, dlong
This commit is contained in:
parent
4116b109f0
commit
7f6358a8b5
70 changed files with 2444 additions and 767 deletions
|
@ -119,7 +119,7 @@ bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
|
|||
}
|
||||
|
||||
// Header verification: the mark is typically non-zero. If we're
|
||||
// at a safepoint, it must not be zero.
|
||||
// at a safepoint, it must not be zero, except when using the new lightweight locking.
|
||||
// Outside of a safepoint, the header could be changing (for example,
|
||||
// another thread could be inflating a lock on this object).
|
||||
if (ignore_mark_word) {
|
||||
|
@ -128,7 +128,7 @@ bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
|
|||
if (obj->mark().value() != 0) {
|
||||
return true;
|
||||
}
|
||||
return !SafepointSynchronize::is_at_safepoint();
|
||||
return LockingMode == LM_LIGHTWEIGHT || !SafepointSynchronize::is_at_safepoint();
|
||||
}
|
||||
|
||||
// used only for asserts and guarantees
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue