[jdk19] RFR: 8289302: Restore CriticalJNINatives
Coleen Phillimore
coleenp at openjdk.org
Thu Sep 22 20:53:40 UTC 2022
On Thu, 22 Sep 2022 19:24:33 GMT, Kirill Prazdnikov <duke at openjdk.org> wrote:
>> This change restores the code in the JVM that implemented the internal JavaCritical or CriticalJNINatives functionality. Customers are using this feature and there's no replacement yet for it.
>> This change is a backout and merge of jDK-8258192: Obsolete the CriticalJNINatives flag.
>> This change also adds the deprecation message that was missed, which I checked is okay with the customer.
>>
>> Tested with tiers1-4.
>
> I can confirm very significant performance drop. We have been using JavaCritical for OpenGL calls, for FreeType & HarfBuzz calls,
> for libPNG interop, for TurboJPEG interop. Basically for everything and it makes a very significant performance gain
>
> Performance numbers were investigated during GraalVM evaluations here: https://github.com/oracle/graal/issues/2873
> You can find all source code there
> And the result is JavaCritical is about 6x-7x faster:
>
> This is my results, numbers is time spent, lower better:
> Jvm
> min critical: 84200
> min non critical: 558200
@kirillp Can you try your measurements with the current JDK 20 build with and without the option:
-XX:+UseSystemMemoryBarrier
-------------
PR: https://git.openjdk.org/jdk19/pull/90
More information about the hotspot-dev
mailing list