Skip to content

Commit

Permalink
8302158: PPC: test/jdk/jdk/internal/vm/Continuation/Fuzz.java: Assert…
Browse files Browse the repository at this point in the history
…ionError: res: false shouldPin: false

Reviewed-by: goetz, mdoerr
  • Loading branch information
reinrich committed Feb 17, 2023
1 parent dc55a7f commit b8c9d6c
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 55 deletions.
8 changes: 6 additions & 2 deletions src/hotspot/cpu/ppc/frame_ppc.cpp
Expand Up @@ -421,8 +421,12 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
#endif

intptr_t *frame::initial_deoptimization_info() {
// unused... but returns fp() to minimize changes introduced by 7087445
return fp();
// `this` is the caller of the deoptee. We want to trim it, if compiled, to
// unextended_sp. This is necessary if the deoptee frame is the bottom frame
// of a continuation on stack (more frames could be in a StackChunk) as it
// will pop its stack args. Otherwise the recursion in
// FreezeBase::recurse_freeze_java_frame() would not stop at the bottom frame.
return is_compiled_frame() ? unextended_sp() : sp();
}

#ifndef PRODUCT
Expand Down
14 changes: 14 additions & 0 deletions src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
Expand Up @@ -3092,6 +3092,13 @@ void SharedRuntime::generate_deopt_blob() {

// stack: (caller_of_deoptee, ...).

// Freezing continuation frames requires that the caller is trimmed to unextended sp if compiled.
// If not compiled the loaded value is equal to the current SP (see frame::initial_deoptimization_info())
// and the frame is effectively not resized.
Register caller_sp = R23_tmp3;
__ ld_ptr(caller_sp, Deoptimization::UnrollBlock::initial_info_offset_in_bytes(), unroll_block_reg);
__ resize_frame_absolute(caller_sp, R24_tmp4, R25_tmp5);

// Loop through the `UnrollBlock' info and create interpreter frames.
push_skeleton_frames(masm, true/*deopt*/,
unroll_block_reg,
Expand Down Expand Up @@ -3227,6 +3234,13 @@ void SharedRuntime::generate_uncommon_trap_blob() {
__ asm_assert_eq("SharedRuntime::generate_deopt_blob: expected Unpack_uncommon_trap");
#endif

// Freezing continuation frames requires that the caller is trimmed to unextended sp if compiled.
// If not compiled the loaded value is equal to the current SP (see frame::initial_deoptimization_info())
// and the frame is effectively not resized.
Register caller_sp = R23_tmp3;
__ ld_ptr(caller_sp, Deoptimization::UnrollBlock::initial_info_offset_in_bytes(), unroll_block_reg);
__ resize_frame_absolute(caller_sp, R24_tmp4, R25_tmp5);

// Allocate new interpreter frame(s) and possibly a c2i adapter
// frame.
push_skeleton_frames(masm, false/*deopt*/,
Expand Down

1 comment on commit b8c9d6c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.