Skip to content

Commit cc34135

Browse files
author
Tom Rodriguez
committed
8343158: [JVMCI] ZGC should deoptimize on old gen allocation
Reviewed-by: aboldtch, eosterlund
1 parent 32f67a3 commit cc34135

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hotspot/share/gc/z/zBarrierSet.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ static void deoptimize_allocation(JavaThread* thread) {
115115
assert(caller_frame.is_compiled_frame(), "must be compiled");
116116

117117
const nmethod* const nm = caller_frame.cb()->as_nmethod();
118-
if (nm->is_compiled_by_c2() && !caller_frame.is_deoptimized_frame()) {
118+
if ((nm->is_compiled_by_c2() || nm->is_compiled_by_jvmci()) && !caller_frame.is_deoptimized_frame()) {
119+
// The JIT might have elided barriers on this object so deoptimize the frame and let the
120+
// intepreter deal with it.
119121
Deoptimization::deoptimize_frame(thread, caller_frame.id());
120122
}
121123
}

0 commit comments

Comments
 (0)