RFR: 8269476: Skip nmethod entry barrier if there is no oops in the jit code
Jie Fu
jiefu at openjdk.java.net
Mon Jun 28 09:44:05 UTC 2021
On Mon, 28 Jun 2021 08:40:16 GMT, 王超 <github.com+25214855+casparcwang at openjdk.org> wrote:
> Lots of c1 and c2 jit methods do not contain any oop, so the nmethod entry barrier can be skipped.
>
> 1, c1 jit code will patch oops or Klass into the nmethod, so the entry barrier cannot directly be eliminated, current implementation uses a jump instruction to replace the jcc instruction. If the jit code is patched to contain oops, the entry barrier is patched back to the jcc instruction.
>
> 2, only the jit code of core library methods do not contain any oops.
>
> 3, currently only support zgc
src/hotspot/cpu/aarch64/gc/shared/barrierSetNMethod_aarch64.cpp line 166:
> 164:
> 165: void BarrierSetNMethod::fix_entry_barrier(nmethod*, bool) {
> 166: // not implement yet
Shall we use `Unimplemented();` here?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4610
More information about the hotspot-dev
mailing list