RFR: 8300197: Freeze/thaw an interpreter frame using a single copy_to_chunk() call
Andrew Haley
aph at openjdk.org
Tue Apr 18 12:51:46 UTC 2023
On Mon, 17 Apr 2023 14:44:28 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> On certain architectures (like AARCH64) padding may be inserted between the locals and the rest of the stack frame in order to keep the frame pointer 16-byte-aligned.
>>
>> This padding is currently not freezed, instead freezing of a single interpreter stack frame is done using two separate copy_to_chunk() calls (see recurse_freeze_interpreted_frame). Likewise, thawing is done using two separate copy_from_chunk() calls.
>>
>> This poses a bit of a problem when trying to relativize stack addresses in interpreter frames ([JDK-8289296](https://bugs.openjdk.org/browse/JDK-8289296)). Since relative offsets may need to be changed during freezing and thawing.
>>
>> By both freezing and thawing the padding we remove the need to change any relative offsets in runtime.
>>
>> Tested tier1-tier8 on supported platforms, found no new issues. PowerPC and RISC-V was sanity tested using Qemu.
>
> src/hotspot/share/runtime/continuationFreezeThaw.cpp line 2157:
>
>> 2155:
>> 2156: // Some architectures (like AArch64/PPC64/RISC-V) adds padding between the locals and the fixed_frame to keep the fp 16-byte-aligned.
>> 2157: // On those architectures we thaw the padding in order to keep the same localized pointer values.
>
> Somehow this suggestion was not delivered...
> Suggestion:
>
> // On those architectures we thaw the padding in order to keep the same relative references.
This is very unclear. I think it means the same "relative pointers," otherwise known as "offsets."
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13477#discussion_r1169987372
More information about the hotspot-dev
mailing list