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

Ruben duke at openjdk.org
Fri Sep 26 12:19:29 UTC 2025


On Fri, 26 Sep 2025 12:16:24 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:
> 
>  - Address review comments
>  - The patch is contributed by @TheRealMDoerr

src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp line 278:

> 276:   __ b(start);
> 277: 
> 278:   guarantee(code_offset() - offset <= deopt_handler_size(), "overflow");

@TheRealMDoerr , I think this has to ensure there will be enough space for all of the stub code, not just the part starting from the entry point. Does this look correct from your perspective?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26678#discussion_r2382237148


More information about the hotspot-dev mailing list