8231250: Shenandoah: Traversal GC should keep alive weak load from heap
Reviewed-by: rkennke
This commit is contained in:
parent
7ae384b2ad
commit
c080a4a4d5
@ -466,17 +466,13 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
|
|||||||
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
|
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
|
||||||
bool not_in_heap = (decorators & IN_NATIVE) != 0;
|
bool not_in_heap = (decorators & IN_NATIVE) != 0;
|
||||||
bool on_reference = on_weak || on_phantom;
|
bool on_reference = on_weak || on_phantom;
|
||||||
bool keep_alive = (decorators & AS_NO_KEEPALIVE) == 0;
|
bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
|
||||||
|
bool keep_alive = ((decorators & AS_NO_KEEPALIVE) == 0) || is_traversal_mode;
|
||||||
|
|
||||||
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
|
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
|
||||||
if (on_oop) {
|
if (on_oop) {
|
||||||
if (not_in_heap) {
|
if (not_in_heap && !is_traversal_mode) {
|
||||||
if (ShenandoahHeap::heap()->is_traversal_mode()) {
|
|
||||||
load_reference_barrier(masm, dst);
|
|
||||||
keep_alive = true;
|
|
||||||
} else {
|
|
||||||
load_reference_barrier_native(masm, dst);
|
load_reference_barrier_native(masm, dst);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
load_reference_barrier(masm, dst);
|
load_reference_barrier(masm, dst);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user