[jdk19] RFR: 8288949: serviceability/jvmti/vthread/ContStackDepthTest/ContStackDepthTest.java failing [v3]
Dean Long
dlong at openjdk.org
Wed Jul 6 02:18:45 UTC 2022
On Tue, 5 Jul 2022 08:31:31 GMT, Ron Pressler <rpressler at openjdk.org> wrote:
>> Please review the following bug fix:
>>
>> `Continuation.enterSpecial` is a generated special nmethod (albeit not a Java method), with a well-known frame layout that calls `Continuation.enter`.
>>
>> Because it is compiled, it resolves the call to `Continuation.enter` to its compiled version, if available. But this results in the compiled `Continuation.enter` being called even when the thread is in interp_only_mode.
>>
>> This change does three things:
>>
>> 1. When entering interp_only_mode, `Continuation::set_cont_fastpath_thread_state` will clear enterSpecial's resolved callsite to Continuation.enter.
>> 2. In interp_only_mode, `SharedRuntime::resolve_static_call_C` will return `Continuation.enter`'s c2i entry rather than `verified_code_entry`.
>> 3. In interp_only_mode, the c2i stub will not patch the callsite.
>>
>> This fix isn't perfect, because a different thread, not in interp_only_mode, might patch the call. A longer-term solution is to create an "interpreted" version of `enterSpecial` and supporting an ad-hoc deoptimization. See https://bugs.openjdk.org/browse/JDK-8289128
>>
>>
>> Passes tiers 1-4 and Loom tiers 1-5.
>
> Ron Pressler has updated the pull request incrementally with two additional commits since the last revision:
>
> - Add an "i2i" entry to enterSpecial
> - Fix comment
src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp line 1222:
> 1220: OopMapSet* oop_maps = new OopMapSet();
> 1221: int interpreted_entry_offset = -1;
> 1222: int compiled_entry_offset = -1;
`compiled_entry_offset` is unsed
src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp line 1535:
> 1533: OopMapSet* oop_maps = new OopMapSet();
> 1534: int interpreted_entry_offset = -1;
> 1535: int compiled_entry_offset = -1;
`compiled_entry_offset` is unsed
-------------
PR: https://git.openjdk.org/jdk19/pull/66
More information about the hotspot-compiler-dev
mailing list