RFR: JDK-8269650: Optimize gc-locker in [Get|Release]StringCritical for latin string
David Holmes
dholmes at openjdk.java.net
Wed Jun 30 12:54:01 UTC 2021
On Wed, 30 Jun 2021 11:55:49 GMT, Hamlin Li <mli at openjdk.org> wrote:
> Currently, JNI GetStringCritical locks gc locker for all strings including latin and non-latin until ReleaseStringCritical.
> But for latin, it's not necessary to still lock gc locker after GetStringCritical, as it's copied anyway whether obj pining is supported or not, so it's fine to unlock gc locker after GetStringCritical.
Hi Hamlin,
This seems quite reasonable - so reasonable that I really need to know why we were not doing this from day one. So I need to do a bit of digging into the history here, but that will have to wait for tomorrow morning. :)
Thanks,
David
-------------
PR: https://git.openjdk.java.net/jdk/pull/4637
More information about the hotspot-dev
mailing list