On Sat, 20 Sep 2025 14:31:03 GMT, Coleen Phillimore <[email protected]> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   remove frames_size parameter and code duplication from 
>> remove_scalarized_frames
>
> src/hotspot/share/runtime/continuationFreezeThaw.cpp line 2075:
> 
>> 2073: }
>> 2074: 
>> 2075: int 
>> ThawBase::remove_scalarized_frames(StackChunkFrameStream<ChunkFrames::CompiledOnly>&
>>  f, stackChunkOop chunk, int frames_size, int &argsize) {
> 
> Thanks for explaining this change to me.  I think this parameter is 
> confusing.  It's the incoming frame_size from the stub frame, and this adds 
> in all the frame sizes from the frames that need a stack repair.
> It might make more sense to me to distinguish these things, have the 
> parameter be "stub_frame_size" or "top_frame_size" and to have a local to 
> accumulate the visited frames sizes like:
> int frames_size = stub_frame_size;

I removed that parameter altogether. I realized we can remove all the 
duplicated code in `remove_scalarized_frames()`, so that the method just 
returns the size of all the frames removed. Then for the stub case, we add this 
value to the size of the stub frame. For the non-stub case, this returned value 
is the final size.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1603#discussion_r2369517735

Reply via email to