RFR: JDK-8304723: Statically allocate global mutexes [v5]

Justin King jcking at openjdk.org
Fri Mar 24 16:46:53 UTC 2023


On Fri, 24 Mar 2023 04:53:46 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Justin King has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Move alignas before static
>>   
>>   Signed-off-by: Justin King <jcking at google.com>
>
> src/hotspot/share/runtime/mutexLocker.cpp line 210:
> 
>> 208: // Specify relative ranked lock
>> 209: #ifdef ASSERT
>> 210: #define MUTEX_DEFL(name, type, held_lock, ...) MUTEX_DEF(name, type, (held_lock)->rank()-1, ##__VA_ARGS__)
> 
> Pre-existing but what does the 'L' suffix mean here? We now have _DEF _DEFN and _DEFL and I'm not clear what the N and L signify. ??
> 
> Nit while you are here `rank()-1` -> `rank() - 1`

Fixed the spacing to be `rank() - 1`.

As far as `N` and `L` I don't think its anything special. I chose `_DEF` to be the shared macro implementation and `N` as a short for `DEFiNition`. `L` I assume means lock, as in define using another lock's rank. But that is a guess.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13143#discussion_r1147827417


More information about the hotspot-dev mailing list