RFR: JDK-8304820: Statically allocate ObjectSynchronizer mutexes
Daniel D. Daugherty
dcubed at openjdk.org
Thu Mar 23 21:04:21 UTC 2023
On Thu, 23 Mar 2023 15:53:28 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.
Marked as reviewed by dcubed (Reviewer).
Thumbs up.
src/hotspot/share/runtime/synchronizer.cpp line 743:
> 741: // Index into the lock array based on the current object address.
> 742: static_assert(is_power_of_2(ARRAY_SIZE(gInflationLocks)), "must be");
> 743: size_t ix = (cast_from_oop<intptr_t>(obj) >> 5) & (ARRAY_SIZE(gInflationLocks)-1);
Since you are touching the line:
nit: s/-1/ - 1/
-------------
PR Review: https://git.openjdk.org/jdk/pull/13160#pullrequestreview-1355612280
PR Comment: https://git.openjdk.org/jdk/pull/13160#issuecomment-1481902381
PR Review Comment: https://git.openjdk.org/jdk/pull/13160#discussion_r1146841808
More information about the hotspot-runtime-dev
mailing list