RFR: JDK-8304820: Statically allocate ObjectSynchronizer mutexes [v3]
David Holmes
dholmes at openjdk.org
Tue Mar 28 05:07:31 UTC 2023
On Mon, 27 Mar 2023 18:16:50 GMT, Justin King <jcking at openjdk.org> wrote:
>> Similar to https://git.openjdk.org/jdk/pull/13143, statically allocate mutexes which live for the lifetime of the process.
>
> Justin King has updated the pull request incrementally with one additional commit since the last revision:
>
> Update approach to avoid implicit constructors
>
> Signed-off-by: Justin King <jcking at google.com>
src/hotspot/share/runtime/synchronizer.cpp line 255:
> 253: // by property of the storage itself being aligned to that requirement and each entry storage being
> 254: // `sizeof(PlatformMutex)` aligned up to `alignof(PlatformMutex)`.
> 255: alignas(PlatformMutex) static uint8_t _inflation_locks[inflation_lock_count()][align_up(sizeof(PlatformMutex), alignof(PlatformMutex))];
I'm afraid you lost me here. Why does this have to be so convoluted/obscure?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13160#discussion_r1150031083
More information about the hotspot-runtime-dev
mailing list