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

Robert Toyonaga duke at openjdk.org
Thu Sep 26 12:29:14 UTC 2024


On Sun, 22 Sep 2024 23:27:52 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/hotspot/share/runtime/mutexLocker.hpp line 261:
>> 
>>> 259: // Same as MutexLocker but can be used during VM init.
>>> 260: // Performs no action if given a null mutex or with detached threads.
>>> 261: class NMTMutexLocker: public ConditionalMutexLocker {
>> 
>> Good, but either call this something generic (e.g. "SafeMutexLocker") or move this to the nmt subdir.
>
> But this isn't generic as it locks the NMT_lock. Maybe move to NMT header file.

Ok I've renamed the mutex and the locker to something more descriptive (`NmtVirtualMemory_lock` and `NmtVirtualMemoryLocker`). I've also moved the locker into nmtCommon.hpp

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20852#discussion_r1776971405


More information about the serviceability-dev mailing list