< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp
Print this page
rev 59438 : 8245823: Shenandoah: inline/optimize ShenandoahEvacOOMScope
@@ -27,10 +27,11 @@
#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,12 +61,13 @@
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());
+ 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,11 +337,11 @@
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;
+ ShenandoahEvacOOMScope oom_evac(_heap);
arraycopy_work<T, true, true, false>(src, count);
}
}
template <class T>
< prev index next >