< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp
Print this page
rev 59438 : 8245823: Shenandoah: inline/optimize ShenandoahEvacOOMScope
*** 27,36 ****
--- 27,37 ----
#include "gc/shared/barrierSet.hpp"
#include "gc/shenandoah/shenandoahAsserts.hpp"
#include "gc/shenandoah/shenandoahBarrierSet.hpp"
#include "gc/shenandoah/shenandoahCollectionSet.inline.hpp"
+ #include "gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp"
#include "gc/shenandoah/shenandoahForwarding.inline.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "gc/shenandoah/shenandoahMarkingContext.inline.hpp"
#include "gc/shenandoah/shenandoahThreadLocalData.hpp"
*** 60,71 ****
oop fwd = resolve_forwarded_not_null_mutator(obj);
if (obj == fwd) {
assert(_heap->is_evacuation_in_progress(),
"evac should be in progress");
! ShenandoahEvacOOMScope scope;
! fwd = _heap->evacuate_object(obj, Thread::current());
}
if (load_addr != NULL && fwd != obj) {
// Since we are here and we know the load address, update the reference.
ShenandoahHeap::cas_oop(fwd, load_addr, obj);
--- 61,73 ----
oop fwd = resolve_forwarded_not_null_mutator(obj);
if (obj == fwd) {
assert(_heap->is_evacuation_in_progress(),
"evac should be in progress");
! Thread* const t = Thread::current();
! ShenandoahEvacOOMScope scope(_heap, t);
! fwd = _heap->evacuate_object(obj, t);
}
if (load_addr != NULL && fwd != obj) {
// Since we are here and we know the load address, update the reference.
ShenandoahHeap::cas_oop(fwd, load_addr, obj);
*** 335,345 ****
template <class T>
void ShenandoahBarrierSet::arraycopy_evacuation(T* src, size_t count) {
assert(_heap->is_evacuation_in_progress(), "only during evacuation");
if (need_bulk_update(reinterpret_cast<HeapWord*>(src))) {
! ShenandoahEvacOOMScope oom_evac;
arraycopy_work<T, true, true, false>(src, count);
}
}
template <class T>
--- 337,347 ----
template <class T>
void ShenandoahBarrierSet::arraycopy_evacuation(T* src, size_t count) {
assert(_heap->is_evacuation_in_progress(), "only during evacuation");
if (need_bulk_update(reinterpret_cast<HeapWord*>(src))) {
! ShenandoahEvacOOMScope oom_evac(_heap);
arraycopy_work<T, true, true, false>(src, count);
}
}
template <class T>
< prev index next >