--- old/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp 2018-06-18 23:00:43.677822069 +0200 +++ new/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp 2018-06-18 23:00:43.384825655 +0200 @@ -27,6 +27,7 @@ #include "gc/shenandoah/shenandoahConnectionMatrix.hpp" #include "gc/shenandoah/shenandoahHeap.hpp" #include "gc/shenandoah/shenandoahHeapRegion.hpp" +#include "gc/shenandoah/shenandoahHeuristics.hpp" #include "gc/shenandoah/shenandoahRuntime.hpp" #include "gc/shenandoah/shenandoahThreadLocalData.hpp" #include "interpreter/interpreter.hpp" @@ -48,7 +49,7 @@ Register addr, Register count, RegSet saved_regs) { if (is_oop) { bool dest_uninitialized = (decorators & AS_DEST_NOT_INITIALIZED) != 0; - if (!dest_uninitialized) { + if (!dest_uninitialized && !ShenandoahHeap::heap()->heuristics()->can_do_traversal_gc()) { __ push(saved_regs, sp); if (count == c_rarg0) { if (addr == c_rarg1) { --- old/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp 2018-06-18 23:00:44.831807945 +0200 +++ new/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp 2018-06-18 23:00:44.564811213 +0200 @@ -27,6 +27,7 @@ #include "gc/shenandoah/shenandoahConnectionMatrix.hpp" #include "gc/shenandoah/shenandoahHeap.hpp" #include "gc/shenandoah/shenandoahHeapRegion.hpp" +#include "gc/shenandoah/shenandoahHeuristics.hpp" #include "gc/shenandoah/shenandoahRuntime.hpp" #include "gc/shenandoah/shenandoahThreadLocalData.hpp" #include "interpreter/interpreter.hpp" @@ -68,7 +69,7 @@ } #endif - if (!dest_uninitialized) { + if (!dest_uninitialized && !ShenandoahHeap::heap()->heuristics()->can_do_traversal_gc()) { Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread); #ifndef _LP64 __ push(thread);