RFR: 8371458: [REDO] Remove exception handler stub code in C2

Martin Doerr mdoerr at openjdk.org
Mon Nov 10 10:54:07 UTC 2025


On Fri, 7 Nov 2025 11:07:40 GMT, Ruben <duke at openjdk.org> wrote:

> The original fix [JDK-8365047](https://bugs.openjdk.org/browse/JDK-8365047) was backed out by [JDK-8371388](https://bugs.openjdk.org/browse/JDK-8371388), this is the REDO.
> 
> The C2 exception handler stub code is only a trampoline to the generated exception handler blob. This change removes the extra step on the way to the generated blob.
> 
> According to some comments in the source code, the exception handler stub code used to be patched upon deoptimization, however presumably these comments are outdated as the patching upon deoptimization happens for post-call NOPs only.

I haven't checked the deopt handler size on x86. Otherwise, it still looks good to me.

src/hotspot/cpu/x86/nativeInst_x86.hpp line 585:

> 583:   };
> 584: 
> 585:   bool check() const { return short_at(0) == 0x1f0f && short_at(2) == 0x0084; }

Maybe a comment would be nice.

-------------

Marked as reviewed by mdoerr (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28192#pullrequestreview-3442431963
PR Review Comment: https://git.openjdk.org/jdk/pull/28192#discussion_r2509917846


More information about the hotspot-dev mailing list