RFR: 8304824: NMT should not use ThreadCritical [v8]

Afshin Zafari azafari at openjdk.org
Sat Oct 12 18:45:14 UTC 2024


On Wed, 2 Oct 2024 13:28:13 GMT, Robert Toyonaga <duke at openjdk.org> wrote:

>> ### Summary
>> This PR just replaces `ThreadCritical` with a lock specific to NMT.  `ThreadCritical` is a big lock and is unnecessary for the purposes of NMT. I've implemented the new lock with a semaphore so that it can be used early before VM init.  There is also the possibility of adding assertions in places we expect NMT to have synchronization. I haven't added assertions yet in many places because some code paths such as the (NMT tests)  don't lock yet. I think it makes sense to close any gaps in locking in another PR in which I can also add more assertions. 
>> 
>> Testing:
>> - hotspot_nmt
>> - gtest:VirtualSpace
>> - tier1
>
> Robert Toyonaga has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update src/hotspot/share/utilities/vmError.cpp
>   
>   Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>

Just an important test or comparison is needed here. Do you have any comparison of  the performance before and after this PR change set? Even if no degrading is expected, better to test it.

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

PR Comment: https://git.openjdk.org/jdk/pull/20852#issuecomment-2408656738


More information about the serviceability-dev mailing list