Skip to content

Commit 9ea3cd2

Browse files
committed
fixes test/jdk/java/foreign/sharedclosejfr/TestSharedCloseJFR.java
1 parent 45ae163 commit 9ea3cd2

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/hotspot/cpu/s390/frame_s390.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,15 @@ frame frame::sender_for_entry_frame(RegisterMap *map) const {
222222

223223
assert(map->include_argument_oops(), "should be set by clear");
224224

225-
if (jfa->last_Java_pc() != nullptr) {
226-
frame fr(jfa->last_Java_sp(), jfa->last_Java_pc());
227-
return fr;
225+
address pc = jfa->last_Java_pc();
226+
if (pc == nullptr) {
227+
// Last_java_pc is not set if we come here from compiled code.
228+
// Assume spill slot for Z_R14 (return register) contains a suitable pc.
229+
// Should have been filled by method entry code.
230+
intptr_t* sp = jfa->last_Java_sp();
231+
pc = sp != nullptr ? (address) *(sp + 14) : nullptr;
228232
}
229-
// Last_java_pc is not set if we come here from compiled code.
230-
frame fr(jfa->last_Java_sp());
233+
frame fr(jfa->last_Java_sp(), nullptr, pc);
231234
return fr;
232235
}
233236

0 commit comments

Comments
 (0)