RFR: JDK-8304723: Statically allocate global mutexes
David Holmes
dholmes at openjdk.org
Wed Mar 22 22:35:42 UTC 2023
On Wed, 22 Mar 2023 17:31:19 GMT, Justin King <jcking at openjdk.org> wrote:
> On posix, switch from pthread_cond_init to static initialization if possible.
Some platforms have the "wrong" default which is why we don't attempt to use the pthread static initializers. But in general statically initializing our Mutex/Monitor would be very fragile IMO - as discussed in the past.
Doing the allocation statically is a different matter. But what does this gain? Is the startup improvement noticeable?
> Created [JDK-8304736](https://bugs.openjdk.org/browse/JDK-8304736) and [JDK-8304738](https://bugs.openjdk.org/browse/JDK-8304738).
Thanks for that.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13143#issuecomment-1480342887
More information about the hotspot-dev
mailing list