RFR: 8330051: Small ObjectMonitor spinning code cleanups [v2]
Daniel D. Daugherty
dcubed at openjdk.org
Tue Apr 16 22:16:46 UTC 2024
On Tue, 16 Apr 2024 21:15:52 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Move first fixed spin after the comment that describes why we do it.
>
> src/hotspot/share/runtime/objectMonitor.hpp line 358:
>
>> 356:
>> 357:
>> 358: enum TryLockResult { CAS_FAILED = -1, HAS_OWNER = 0, SUCCESS = 1};
>
> nit: Perhaps just one blank line to separate the new enum.
Using a common prefix on enum values can make things easier to grep for
and find what you want:
enum TryLockResult { TL_CAS_FAILED = -1, TL_HAS_OWNER = 0, TL_SUCCESS = 1};
In particular, `SUCCESS` gets just way too many hits...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18730#discussion_r1567952009
More information about the hotspot-runtime-dev
mailing list