Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable intrinsics usage for the JIT compiler?

Tags:

java

jvm

jit

I am doing some performance tests on the JVM, and I would like to measure the impact of intrinsics usage.

I would like to disable the JIT use of intrinsics for some methods without going into the interpreted mode. Is there a way to do that ? Thank you

like image 747
Bionix1441 Avatar asked May 21 '15 10:05

Bionix1441


1 Answers

Use

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

For example

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

As @apangin noticed, you may use -XX:+PrintIntrinsics first to see which methods are actually intrinsified in your test and disable them.

like image 183
Tagir Valeev Avatar answered Oct 07 '22 05:10

Tagir Valeev