< prev index next >

src/hotspot/share/runtime/stackValue.cpp

Print this page

        

*** 27,36 **** --- 27,39 ---- #include "oops/compressedOops.inline.hpp" #include "oops/oop.hpp" #include "runtime/frame.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/stackValue.hpp" + #if INCLUDE_ZGC + #include "gc/z/zBarrier.inline.hpp" + #endif StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMap* reg_map, ScopeValue* sv) { if (sv->is_location()) { // Stack or register value Location loc = ((LocationValue *)sv)->location();
*** 117,126 **** --- 120,136 ---- // The narrow_oop_base could be NULL or be the address // of the page below heap. Use NULL value for both cases. val = (oop)NULL; } #endif + #if INCLUDE_ZGC + // Deoptimization must make sure all oop have passed load barrier + if (UseZGC) { + val = ZBarrier::load_barrier_on_oop_field_preloaded((oop*)value_addr, val); + } + #endif + Handle h(Thread::current(), val); // Wrap a handle around the oop return new StackValue(h); } case Location::addr: { ShouldNotReachHere(); // both C1 and C2 now inline jsrs
< prev index next >