RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v12]
Dean Long
dlong at openjdk.org
Sat Oct 26 00:06:16 UTC 2024
On Tue, 22 Oct 2024 02:18:19 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/continuationFreezeThaw_aarch64.inline.hpp line 300:
>>
>>> 298: CodeBlob* cb = top.cb();
>>> 299:
>>> 300: if (cb->frame_size() == 2) {
>>
>> Is this a filter to identify c2 runtime stubs? Is there some other property we can check or assert here? This assumes that no other runtime frame will have this size.
>
> We could also check the caller of the runtime frame, something like:
>
> #ifdef ASSERT
> RegisterMap map(JavaThread::current(),
> RegisterMap::UpdateMap::skip,
> RegisterMap::ProcessFrames::skip,
> RegisterMap::WalkContinuation::skip);
> frame caller = top.sender(&map);
> assert(caller.is_compiled_frame(), "");
> assert(cb->frame_size() > 2 || caller.cb()->as_nmethod()->is_compiled_by_c2(), "");
> #endif
>
> Ideally we would want to check if cb->frame_size() is different than the actual size of the physical frame.
I agree, checking for frame_size() == 2 seems fragile.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1817458483
More information about the nio-dev
mailing list