如何禁用JIT编译器的内在函数用法? [英] How to disable intrinsics usage for the JIT compiler?

查看:158
本文介绍了如何禁用JIT编译器的内在函数用法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对 JVM 进行一些性能测试,我想测量内在函数使用的影响。

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

我想禁用 JIT 对某些方法使用内在函数而不进入解释模式。有没有办法做到这一点 ?谢谢

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

推荐答案

使用

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

例如

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

正如@apangin注意到的,你可以先用 -XX:+ PrintIntrinsics 来看看哪些方法实际上在测试中是固有的并且禁用它们。

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

这篇关于如何禁用JIT编译器的内在函数用法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆