RFR: 8365047: Remove exception handler stub code in C2 [v4]

Martin Doerr mdoerr at openjdk.org
Wed Sep 24 07:58:26 UTC 2025


On Fri, 12 Sep 2025 16:36:56 GMT, Ruben <duke at openjdk.org> wrote:

>> 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.
>
> Ruben has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Offset the deoptimization handler entry point
>    
>    Change-Id: I596317ec6a364b341e4642636fa5cf08f87ed722
>  - Revert "Ensure stub code is not adjacent to a call"

Thanks for pointing me to the uncommon trap sequence. Right, the post_call NOPs make the previous implementation (unmodified deop handlers) reliable on all platforms except arm32 and s390 which don't have them, yet.
So, an easier fix would be to implement them for the CallRuntimeDirect nodes for these 2 platforms and adding comments to all platforms explaining that they are strictly needed.

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

PR Comment: https://git.openjdk.org/jdk/pull/26678#issuecomment-3327079541


More information about the hotspot-dev mailing list