RFR: 8325303: Replace markWord.is_neutral() with markWord.is_unlocked()

Daniel D. Daugherty dcubed at openjdk.org
Thu Apr 4 20:51:09 UTC 2024


On Wed, 7 Feb 2024 01:52:00 GMT, David Holmes <dholmes at openjdk.org> wrote:

> This is a small tidy up to try and remove confusion between checking `is_neutral` (a general state normally associated with a displaced markword in a "pristine" state) and `is_unlocked` (a specific state within the locking protocol). The underlying bit-pattern is the same and so these have been used somewhat synonymously/interchangeably.
> 
> A few comment tweaks too.
> 
> Testing: tiers 1-3 (sanity)
> 
> Thanks.

Thumbs up.

I still found nine uses of `is_neutral()` in src/hotspot/share/runtime/synchronizer.cpp.
I suspect you left these alone because they are all associated with displaced mark
words, AKA: dmw/dmh/mark/temp/test. There are just too freaking names for the
same concept of the "displaced mark word". I thought I had cleaned those up years
ago, but obviously not everywhere or they changed again.

-------------

Marked as reviewed by dcubed (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17741#pullrequestreview-1981124794


More information about the hotspot-dev mailing list