RFR: 8273917: Remove 'leaf' ranking for Mutex [v3]
Coleen Phillimore
coleenp at openjdk.java.net
Wed Oct 6 01:22:26 UTC 2021
On Wed, 6 Oct 2021 00:26:24 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Adjust some nonleaf-2 ranks.
>
> src/hotspot/share/runtime/mutex.cpp line 300:
>
>> 298:
>> 299: assert(_rank >= 0, "Bad lock rank: %s", name);
>> 300: assert(_rank <= nonleaf, "Bad lock rank: %s", name);
>
> Can we just combine these into a single range check? And really the assert message should include the bad rank value. And probably this basic range check should be first.
I combined the check and moved it up for now. In my next change that makes Rank into an enum class, the range check is different because you can't add to nonleaf which is going to be renamed 'safepoint' rank.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5801
More information about the shenandoah-dev
mailing list