RFR: 8289925: Shared code shouldn't reference the platform specific method frame::interpreter_frame_last_sp() [v2]

Dean Long dlong at openjdk.org
Wed Aug 24 20:32:28 UTC 2022


On Mon, 18 Jul 2022 06:41:57 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> The method `frame::interpreter_frame_last_sp()` is a platform method in the sense that it is not declared in a shared header file. It is declared and defined on some platforms though (x86 and aarch64 I think).
>> 
>> `frame::interpreter_frame_last_sp()` existed on these platforms before vm continuations (aka loom). Shared code that is part of the vm continuations implementation references it. This breaks the platform abstraction.
>> 
>> This fix simply removes the special case for interpreted frames in the shared method `Continuation::continuation_bottom_sender()`. I cannot see a reason for the distinction between interpreted and compiled frames. The shared code reference to `frame::interpreter_frame_last_sp()` is thereby eliminated.
>> 
>> Testing: hotspot_loom and jdk_loom on x86_64 and aarch64.
>
> Richard Reingruber has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
> 
>  - Merge branch 'master'
>  - Remove platform dependent method interpreter_frame_last_sp() from shared code

It looks like the interpreter trims the stack before a call:

https://github.com/openjdk/jdk/blob/4594696f5462995ec58ca1d2c1bde7cc857c5caf/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp#L1147-L1157

so it seems like using unextended_sp() is actually fine, and the drawing in continuationFreezeThaw_ppc.inline.hpp needs to be updated.

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

PR: https://git.openjdk.org/jdk/pull/9411


More information about the hotspot-runtime-dev mailing list