RFR: 8225631: Consider replacing muxAcquire/Release with PlatformMonitor [v3]

David Holmes david.holmes at oracle.com
Mon Nov 16 22:48:19 UTC 2020


On 17/11/2020 7:10 am, Kim Barrett wrote:
> On Mon, 16 Nov 2020 17:01:29 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> 
>>> David Holmes has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>>
>>>   - Merge branch 'master' into 8225631
>>>   - Feedback from Coleen, Kim and Dan.
>>>   - 8225631: Consider replacing muxAcquire/Release with PlatformMonitor
>>
>> Looks good! Thank you for the cleanups.
> 
>>> This is assuming NINFLATIONLOCKS is a power of 2.  Consider adding a static_assert.  (Note: is_power_of_2 was made constexpr by JDK-8247910.)
>>
>> Added to the initialize() function.
> 
> The initialize() function is the wrong place.  There's nothing in initialize that cares.  The place for the assert is with the code that cares that it's a power of 2.

As Dan indicated I put it there so that it is only checked once - no 
point checking it on every use. Initialization code is often used to 
check invariants.

David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/1196
> 


More information about the hotspot-runtime-dev mailing list