RFR: 8269476: Skip nmethod entry barrier if there is no oops in the jit code [v2]
Zhengyu Gu
zgu at openjdk.java.net
Mon Jun 28 12:52:09 UTC 2021
On Mon, 28 Jun 2021 12:34:20 GMT, 王超 <github.com+25214855+casparcwang at openjdk.org> wrote:
>> I think there is a simpler way to accomplish this by playing with disarmed_value, e.g. setting nmethod's disarmed_value to certain pattern to indicate it is always disarmed.
>
>> I think there is a simpler way to accomplish this by playing with disarmed_value, e.g. setting nmethod's disarmed_value to certain pattern to indicate it is always disarmed.
>
> `__ cmpl(disarmed_addr, 0);` will only set ZF=1 when `dest = source`. By playing with disarmed_value, do you mean also change the cmpl instruction to other instruction?
You may need an additional instruction, e.g. uses MSB of disarmed_value to indicate always disarmed and test the bit before `cmpl`.
Also, you need a new method to set the bit during nmethod registration.
nmethod entry barrier tests is_armed() early, so may benefit more.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4610
More information about the hotspot-dev
mailing list