Skip to content

Commit aaf4f69

Browse files
committed
8255233: InterpreterRuntime::at_unwind should be a JRT_LEAF
Reviewed-by: coleenp, dholmes
1 parent bbf0a31 commit aaf4f69

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,9 @@ void InterpreterMacroAssembler::remove_activation(
551551
br(Assembler::AL, fast_path);
552552
bind(slow_path);
553553
push(state);
554-
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind));
554+
set_last_Java_frame(esp, rfp, (address)pc(), rscratch1);
555+
super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind), rthread);
556+
reset_last_Java_frame(true);
555557
pop(state);
556558
bind(fast_path);
557559

src/hotspot/cpu/x86/interp_masm_x86.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,9 @@ void InterpreterMacroAssembler::remove_activation(
10031003
jmp(fast_path);
10041004
bind(slow_path);
10051005
push(state);
1006-
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind));
1006+
set_last_Java_frame(rthread, noreg, rbp, (address)pc());
1007+
super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind), rthread);
1008+
reset_last_Java_frame(rthread, true);
10071009
pop(state);
10081010
NOT_LP64(get_thread(rthread);) // call_VM clobbered it, restore
10091011
bind(fast_path);

src/hotspot/share/interpreter/interpreterRuntime.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,10 +1172,7 @@ JRT_ENTRY(void, InterpreterRuntime::at_safepoint(JavaThread* thread))
11721172
}
11731173
JRT_END
11741174

1175-
JRT_ENTRY(void, InterpreterRuntime::at_unwind(JavaThread* thread))
1176-
// JRT_END does an implicit safepoint check, hence we are guaranteed to block
1177-
// if this is called during a safepoint
1178-
1175+
JRT_LEAF(void, InterpreterRuntime::at_unwind(JavaThread* thread))
11791176
// This function is called by the interpreter when the return poll found a reason
11801177
// to call the VM. The reason could be that we are returning into a not yet safe
11811178
// to access frame. We handle that below.

0 commit comments

Comments
 (0)