On Thu, 22 Aug 2024 11:21:46 GMT, Markus Grönlund <mgron...@openjdk.org> wrote:
>> Is it an implicit invariant that execution always continues in the >> interpreter after an uncommon trap? I.e., I don't need to explicitly tell it >> to "re-execute" there? > > It is updated to use Action::none to keep the nmethod. The trap code picks up > the correct bytecode (invokestatic) from the trap scope. So after unrolling > the host method (the inliner), the trap bytecode (i.e., the invokestatic call > to Continuation.pin() or unpin()) is re-executed in the interpreter. This is > also without setting the explicit re-execute state (which may mean something > else). Yes, we should not throw out compiled nmethod if one thread need to got into Interpreter and throw an exception. Other threads will continue to use this nmethod. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20664#discussion_r1727404499