RFR: 8330051: Small ObjectMonitor spinning code cleanups [v4]

Axel Boldt-Christmas aboldtch at openjdk.org
Thu Apr 18 14:23:58 UTC 2024


On Thu, 18 Apr 2024 12:22:03 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Make TryLockResult an enum class for better grepping and C++ type checking.
>
> src/hotspot/share/runtime/objectMonitor.hpp line 358:
> 
>> 356: 
>> 357: 
>> 358:   enum class TryLockResult { CasFailed = -1, HasOwner = 0, Success = 1};
> 
> Maybe "Failed" instead of "CasFailed" for consistency, since we don't call the success "CasSuccess".

Might even call it `Interference`. The way it is used is to signal to the spin code that we observed an unlocked monitor, but our locking was interfered with.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18730#discussion_r1570865745


More information about the hotspot-runtime-dev mailing list