8254573: Shenandoah: Streamline/inline native-LRB entry point
Reviewed-by: shade
This commit is contained in:
parent
a6c23b7753
commit
6620b617a7
src/hotspot/share/gc/shenandoah
@ -179,39 +179,6 @@ void ShenandoahBarrierSet::on_thread_detach(Thread *thread) {
|
||||
}
|
||||
}
|
||||
|
||||
oop ShenandoahBarrierSet::load_reference_barrier_native(oop obj, oop* load_addr) {
|
||||
return load_reference_barrier_native_impl(obj, load_addr);
|
||||
}
|
||||
|
||||
oop ShenandoahBarrierSet::load_reference_barrier_native(oop obj, narrowOop* load_addr) {
|
||||
return load_reference_barrier_native_impl(obj, load_addr);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
oop ShenandoahBarrierSet::load_reference_barrier_native_impl(oop obj, T* load_addr) {
|
||||
if (CompressedOops::is_null(obj)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ShenandoahMarkingContext* const marking_context = _heap->marking_context();
|
||||
if (_heap->is_concurrent_weak_root_in_progress() && !marking_context->is_marked(obj)) {
|
||||
Thread* thr = Thread::current();
|
||||
if (thr->is_Java_thread()) {
|
||||
return NULL;
|
||||
} else {
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
oop fwd = load_reference_barrier_not_null(obj);
|
||||
if (ShenandoahSelfFixing && 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);
|
||||
}
|
||||
|
||||
return fwd;
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSet::clone_barrier_runtime(oop src) {
|
||||
if (_heap->has_forwarded_objects() || (ShenandoahStoreValEnqueueBarrier && _heap->is_concurrent_mark_in_progress())) {
|
||||
clone_barrier(src);
|
||||
|
@ -93,8 +93,8 @@ public:
|
||||
template <class T>
|
||||
inline oop load_reference_barrier_mutator(oop obj, T* load_addr);
|
||||
|
||||
oop load_reference_barrier_native(oop obj, oop* load_addr);
|
||||
oop load_reference_barrier_native(oop obj, narrowOop* load_addr);
|
||||
template <class T>
|
||||
inline oop load_reference_barrier_native(oop obj, T* load_addr);
|
||||
|
||||
private:
|
||||
template <class T>
|
||||
@ -113,9 +113,6 @@ private:
|
||||
|
||||
oop load_reference_barrier_impl(oop obj);
|
||||
|
||||
template <class T>
|
||||
oop load_reference_barrier_native_impl(oop obj, T* load_addr);
|
||||
|
||||
inline bool need_bulk_update(HeapWord* dst);
|
||||
public:
|
||||
// Callbacks for runtime accesses.
|
||||
|
@ -76,6 +76,31 @@ inline oop ShenandoahBarrierSet::load_reference_barrier_mutator(oop obj, T* load
|
||||
return fwd;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline oop ShenandoahBarrierSet::load_reference_barrier_native(oop obj, T* load_addr) {
|
||||
if (CompressedOops::is_null(obj)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ShenandoahMarkingContext* const marking_context = _heap->marking_context();
|
||||
if (_heap->is_concurrent_weak_root_in_progress() && !marking_context->is_marked(obj)) {
|
||||
Thread* thr = Thread::current();
|
||||
if (thr->is_Java_thread()) {
|
||||
return NULL;
|
||||
} else {
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
oop fwd = load_reference_barrier_not_null(obj);
|
||||
if (ShenandoahSelfFixing && 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);
|
||||
}
|
||||
|
||||
return fwd;
|
||||
}
|
||||
|
||||
inline void ShenandoahBarrierSet::enqueue(oop obj) {
|
||||
assert(obj != NULL, "checked by caller");
|
||||
assert(_satb_mark_queue_set.is_active(), "only get here when SATB active");
|
||||
|
Loading…
x
Reference in New Issue
Block a user