Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8255233: InterpreterRuntime::at_unwind should be a JRT_LEAF #828

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp
Expand Up @@ -551,7 +551,9 @@ void InterpreterMacroAssembler::remove_activation(
br(Assembler::AL, fast_path);
bind(slow_path);
push(state);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind));
set_last_Java_frame(esp, rfp, (address)pc(), rscratch1);
super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind), rthread);
reset_last_Java_frame(true);
pop(state);
bind(fast_path);

Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/cpu/x86/interp_masm_x86.cpp
Expand Up @@ -999,7 +999,9 @@ void InterpreterMacroAssembler::remove_activation(
jmp(fast_path);
bind(slow_path);
push(state);
call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind));
set_last_Java_frame(rthread, noreg, rbp, (address)pc());
super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::at_unwind), rthread);
reset_last_Java_frame(rthread, true);
pop(state);
NOT_LP64(get_thread(rthread);) // call_VM clobbered it, restore
bind(fast_path);
Expand Down
5 changes: 1 addition & 4 deletions src/hotspot/share/interpreter/interpreterRuntime.cpp
Expand Up @@ -1172,10 +1172,7 @@ JRT_ENTRY(void, InterpreterRuntime::at_safepoint(JavaThread* thread))
}
JRT_END

JRT_ENTRY(void, InterpreterRuntime::at_unwind(JavaThread* thread))
// JRT_END does an implicit safepoint check, hence we are guaranteed to block
// if this is called during a safepoint

JRT_LEAF(void, InterpreterRuntime::at_unwind(JavaThread* thread))
// This function is called by the interpreter when the return poll found a reason
// to call the VM. The reason could be that we are returning into a not yet safe
// to access frame. We handle that below.
Expand Down