RFR: 8365047: Remove exception handler stub code in C2 [v2]
Ruben
duke at openjdk.org
Thu Aug 28 16:29:44 UTC 2025
On Thu, 14 Aug 2025 08:56:19 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 one additional commit since the last revision:
>
> Address review comments
One of these checks is at `frame::get_deopt_original_pc` - based on the result `frame::setup` determines whether a deoptimization is in progress.
- https://github.com/openjdk/jdk/blob/2d8012a392265781a90b2c3e1ea0bce14efbd41b/src/hotspot/share/runtime/frame.inline.hpp#L74-L82
- https://github.com/openjdk/jdk/blob/2d8012a392265781a90b2c3e1ea0bce14efbd41b/src/hotspot/cpu/arm/frame_arm.inline.hpp#L114-L130
There is also a similar check - specifically for AArch32 - to determine value of `SP` at `frame::adjust_unextended_sp` which wouldn't be affected by the specific issue (at least in `release` build) because it compares with the special case of deoptimization handler stub code used for `MethodHandle` call sites.
- https://github.com/openjdk/jdk/blob/2d8012a392265781a90b2c3e1ea0bce14efbd41b/src/hotspot/cpu/arm/frame_arm.cpp#L356-L381
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26678#issuecomment-3234169197
More information about the hotspot-dev
mailing list