How to disable the use of intrinsics for the JIT compiler?

I am running some performance tests on the JVM , and I would like to measure the impact of using built-in tools.

I would like to disable the use of the built-in JIT functions for some methods without going into interpreted mode. Is there any way to do this? thank you

+6
source share
1 answer

Using

 java -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_<method_name>[,...] 

for instance

 java -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_equals,_hashCode 

As @apangin noted, you can first use -XX:+PrintIntrinsics to see which methods are actually built into your test and disable them.

+8
source

Source: https://habr.com/ru/post/987655/


All Articles