8238782: Cleanup Deoptimization::deoptimize(): remove unused RegisterMap argument and don't update RegisterMap in callers if UseBiasedLocking is enabled

Reviewed-by: dholmes, kvn
This commit is contained in:
Richard Reingruber 2020-02-12 09:18:37 +01:00
parent 446f59a26c
commit b0b8190ea2
6 changed files with 20 additions and 25 deletions

View file

@ -2413,11 +2413,10 @@ void JavaThread::send_thread_stop(oop java_throwable) {
if (has_last_Java_frame()) {
frame f = last_frame();
if (f.is_runtime_frame() || f.is_safepoint_blob_frame()) {
// BiasedLocking needs an updated RegisterMap for the revoke monitors pass
RegisterMap reg_map(this, UseBiasedLocking);
RegisterMap reg_map(this, false);
frame compiled_frame = f.sender(&reg_map);
if (!StressCompiledExceptionHandlers && compiled_frame.can_be_deoptimized()) {
Deoptimization::deoptimize(this, compiled_frame, &reg_map);
Deoptimization::deoptimize(this, compiled_frame);
}
}
}
@ -2862,8 +2861,7 @@ void JavaThread::frames_do(void f(frame*, const RegisterMap* map)) {
// Deoptimization
// Function for testing deoptimization
void JavaThread::deoptimize() {
// BiasedLocking needs an updated RegisterMap for the revoke monitors pass
StackFrameStream fst(this, UseBiasedLocking);
StackFrameStream fst(this, false);
bool deopt = false; // Dump stack only if a deopt actually happens.
bool only_at = strlen(DeoptimizeOnlyAt) > 0;
// Iterate over all frames in the thread and deoptimize
@ -2900,7 +2898,7 @@ void JavaThread::deoptimize() {
trace_frames();
trace_stack();
}
Deoptimization::deoptimize(this, *fst.current(), fst.register_map());
Deoptimization::deoptimize(this, *fst.current());
}
}
@ -2926,11 +2924,10 @@ void JavaThread::make_zombies() {
void JavaThread::deoptimize_marked_methods() {
if (!has_last_Java_frame()) return;
// BiasedLocking needs an updated RegisterMap for the revoke monitors pass
StackFrameStream fst(this, UseBiasedLocking);
StackFrameStream fst(this, false);
for (; !fst.is_done(); fst.next()) {
if (fst.current()->should_be_deoptimized()) {
Deoptimization::deoptimize(this, *fst.current(), fst.register_map());
Deoptimization::deoptimize(this, *fst.current());
}
}
}