< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
Print this page
rev 54386 : 8221766: Load-reference barriers for Shenandoah
*** 387,400 ****
if (_heuristics->is_experimental() && !UnlockExperimentalVMOptions) {
vm_exit_during_initialization(
err_msg("Heuristics \"%s\" is experimental, and must be enabled via -XX:+UnlockExperimentalVMOptions.",
_heuristics->name()));
}
-
- if (ShenandoahStoreValEnqueueBarrier && ShenandoahStoreValReadBarrier) {
- vm_exit_during_initialization("Cannot use both ShenandoahStoreValEnqueueBarrier and ShenandoahStoreValReadBarrier");
- }
log_info(gc, init)("Shenandoah heuristics: %s",
_heuristics->name());
} else {
ShouldNotReachHere();
}
--- 387,396 ----
*** 788,798 ****
} else {
assert(req.is_gc_alloc(), "Can only accept GC allocs here");
result = allocate_memory_under_lock(req, in_new_region);
// Do not call handle_alloc_failure() here, because we cannot block.
! // The allocation failure would be handled by the WB slowpath with handle_alloc_failure_evac().
}
if (in_new_region) {
control_thread()->notify_heap_changed();
}
--- 784,794 ----
} else {
assert(req.is_gc_alloc(), "Can only accept GC allocs here");
result = allocate_memory_under_lock(req, in_new_region);
// Do not call handle_alloc_failure() here, because we cannot block.
! // The allocation failure would be handled by the LRB slowpath with handle_alloc_failure_evac().
}
if (in_new_region) {
control_thread()->notify_heap_changed();
}
*** 1102,1112 ****
void work(uint worker_id) {
ShenandoahParallelWorkerSession worker_session(worker_id);
ShenandoahEvacOOMScope oom_evac_scope;
ShenandoahEvacuateUpdateRootsClosure cl;
-
MarkingCodeBlobClosure blobsCl(&cl, CodeBlobToOopClosure::FixRelocations);
_rp->process_evacuate_roots(&cl, &blobsCl, worker_id);
}
};
--- 1098,1107 ----
*** 2059,2076 ****
void ShenandoahHeap::unregister_nmethod(nmethod* nm) {
ShenandoahCodeRoots::remove_nmethod(nm);
}
oop ShenandoahHeap::pin_object(JavaThread* thr, oop o) {
- o = ShenandoahBarrierSet::barrier_set()->write_barrier(o);
ShenandoahHeapLocker locker(lock());
heap_region_containing(o)->make_pinned();
return o;
}
void ShenandoahHeap::unpin_object(JavaThread* thr, oop o) {
- o = ShenandoahBarrierSet::barrier_set()->read_barrier(o);
ShenandoahHeapLocker locker(lock());
heap_region_containing(o)->make_unpinned();
}
GCTimer* ShenandoahHeap::gc_timer() const {
--- 2054,2069 ----
< prev index next >