8232674: Fix build and rename ShenandoahBarrierSet::oop_load_from_native_barrier
Reviewed-by: zgu
This commit is contained in:
parent
ee4c8f5f19
commit
76465eb1d9
@ -1033,7 +1033,7 @@ void ShenandoahBarrierC2Support::call_lrb_stub(Node*& ctrl, Node*& val, Node* lo
|
||||
|
||||
address calladdr = is_native ? CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native)
|
||||
: target;
|
||||
const char* name = is_native ? "oop_load_from_native_barrier" : "load_reference_barrier";
|
||||
const char* name = is_native ? "load_reference_barrier_native" : "load_reference_barrier";
|
||||
Node* call = new CallLeafNode(ShenandoahBarrierSetC2::shenandoah_load_reference_barrier_Type(), calladdr, name, TypeRawPtr::BOTTOM);
|
||||
|
||||
call->init_req(TypeFunc::Control, ctrl);
|
||||
|
@ -262,7 +262,18 @@ void ShenandoahBarrierSet::on_thread_detach(Thread *thread) {
|
||||
}
|
||||
}
|
||||
|
||||
oop ShenandoahBarrierSet::oop_load_from_native_barrier(oop obj, oop* load_addr) {
|
||||
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) {
|
||||
// Assumption: narrow oop version should not be used anywhere.
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
oop ShenandoahBarrierSet::load_reference_barrier_native_impl(oop obj, T* load_addr) {
|
||||
if (CompressedOops::is_null(obj)) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -84,10 +84,6 @@ public:
|
||||
|
||||
void write_ref_field_work(void* v, oop o, bool release = false);
|
||||
|
||||
oop oop_load_from_native_barrier(oop obj, oop* load_addr);
|
||||
oop oop_load_from_native_barrier(oop obj, narrowOop* load_addr);
|
||||
|
||||
|
||||
virtual void on_thread_create(Thread* thread);
|
||||
virtual void on_thread_destroy(Thread* thread);
|
||||
virtual void on_thread_attach(Thread* thread);
|
||||
@ -108,6 +104,9 @@ public:
|
||||
template <class T>
|
||||
oop load_reference_barrier_mutator_work(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);
|
||||
|
||||
void enqueue(oop obj);
|
||||
|
||||
private:
|
||||
@ -120,6 +119,9 @@ private:
|
||||
|
||||
oop load_reference_barrier_impl(oop obj);
|
||||
|
||||
template <class T>
|
||||
oop load_reference_barrier_native_impl(oop obj, T* load_addr);
|
||||
|
||||
static void keep_alive_if_weak(DecoratorSet decorators, oop value) {
|
||||
assert((decorators & ON_UNKNOWN_OOP_REF) == 0, "Reference strength must be known");
|
||||
const bool on_strong_oop_ref = (decorators & ON_STRONG_OOP_REF) != 0;
|
||||
|
@ -69,7 +69,7 @@ template <DecoratorSet decorators, typename BarrierSetT>
|
||||
template <typename T>
|
||||
inline oop ShenandoahBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_load_not_in_heap(T* addr) {
|
||||
oop value = Raw::oop_load_not_in_heap(addr);
|
||||
value = ShenandoahBarrierSet::barrier_set()->oop_load_from_native_barrier(value, addr);
|
||||
value = ShenandoahBarrierSet::barrier_set()->load_reference_barrier_native(value, addr);
|
||||
keep_alive_if_weak(decorators, value);
|
||||
return value;
|
||||
}
|
||||
|
@ -83,5 +83,5 @@ JRT_LEAF(void, ShenandoahRuntime::shenandoah_clone_barrier(oopDesc* src))
|
||||
JRT_END
|
||||
|
||||
JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_native(oopDesc * src, oop* load_addr))
|
||||
return (oopDesc*) ShenandoahBarrierSet::barrier_set()->oop_load_from_native_barrier(oop(src), load_addr);
|
||||
return (oopDesc*) ShenandoahBarrierSet::barrier_set()->load_reference_barrier_native(oop(src), load_addr);
|
||||
JRT_END
|
||||
|
Loading…
Reference in New Issue
Block a user