RFR: 8300197: Freeze/thaw an interpreter frame using a single copy_to_chunk() call

Richard Reingruber rrich at openjdk.org
Mon Apr 17 14:47:36 UTC 2023


On Mon, 17 Apr 2023 14:12:02 GMT, Fredrik Bredberg <duke at openjdk.org> wrote:

>> src/hotspot/share/runtime/continuationFreezeThaw.cpp line 2160:
>> 
>>> 2158:   copy_from_chunk(heap_frame_top, stack_frame_top, fsize);
>>> 2159: 
>>> 2160:   set_interpreter_frame_bottom(f, stack_frame_bottom); // the copy overwrites the metadata
>> 
>> Since ThawBase::set_interpreter_frame_bottom has nothing to do after this change, I think it might be cleaner to remove this function at the same time?
>
> I see what you mean, but I chose to keep it because of the assert() in ThawBase::set_interpreter_frame_bottom.
> After all, it was this assert that alerted me to the JDK-8305247 bug.

Is it possible to get an equivalent but platform independent version of the assertion?
Something like `assert(f.interpreter_frame_local_at(0) == stack_frame_bottom - 1, "");` might work.
It could replace the call of `set_interpreter_frame_bottom()`.
After all with this pr no platform will ever have to actually set the interpreter frame bottom so it would be good to at least rename the method.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13477#discussion_r1168825041


More information about the hotspot-dev mailing list