8266519: Cleanup resolve() leftovers from BarrierSet et al

Reviewed-by: kbarrett, stefank
This commit is contained in:
Roman Kennke 2021-08-19 19:50:25 +00:00
parent 9569159d25
commit 7eccbd4fde
4 changed files with 1 additions and 41 deletions

View File

@ -310,10 +310,6 @@ public:
static void clone_in_heap(oop src, oop dst, size_t size) {
Raw::clone(src, dst, size);
}
static oop resolve(oop obj) {
return Raw::resolve(obj);
}
};
};

View File

@ -57,7 +57,6 @@
// * atomic_xchg_at: Atomically swap a new value at an internal pointer address if previous value matched the compared value.
// * arraycopy: Copy data from one heap array to another heap array. The ArrayAccess class has convenience functions for this.
// * clone: Clone the contents of an object to a newly allocated object.
// * resolve: Resolve a stable to-space invariant oop that is guaranteed not to relocate its payload until a subsequent thread transition.
//
// == IMPLEMENTATION ==
// Each access goes through the following steps in a template pipeline.

View File

@ -200,13 +200,6 @@ namespace AccessInternal {
}
};
template <class GCBarrierType, DecoratorSet decorators>
struct PostRuntimeDispatch<GCBarrierType, BARRIER_RESOLVE, decorators>: public AllStatic {
static oop access_barrier(oop obj) {
return GCBarrierType::resolve(obj);
}
};
// Resolving accessors with barriers from the barrier set happens in two steps.
// 1. Expand paths with runtime-decorators, e.g. is UseCompressedOops on or off.
// 2. Expand paths for each BarrierSet available in the system.
@ -354,13 +347,6 @@ namespace AccessInternal {
_clone_func = function;
function(src, dst, size);
}
template <DecoratorSet decorators, typename T>
oop RuntimeDispatch<decorators, T, BARRIER_RESOLVE>::resolve_init(oop obj) {
func_t function = BarrierResolver<decorators, func_t, BARRIER_RESOLVE>::resolve_barrier();
_resolve_func = function;
return function(obj);
}
}
#endif // SHARE_OOPS_ACCESS_INLINE_HPP

View File

@ -63,8 +63,7 @@ namespace AccessInternal {
BARRIER_ATOMIC_XCHG,
BARRIER_ATOMIC_XCHG_AT,
BARRIER_ARRAYCOPY,
BARRIER_CLONE,
BARRIER_RESOLVE
BARRIER_CLONE
};
template <DecoratorSet decorators, typename T>
@ -114,7 +113,6 @@ namespace AccessInternal {
arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
size_t length);
typedef void (*clone_func_t)(oop src, oop dst, size_t size);
typedef oop (*resolve_func_t)(oop obj);
};
template <DecoratorSet decorators>
@ -141,7 +139,6 @@ namespace AccessInternal {
ACCESS_GENERATE_ACCESS_FUNCTION(BARRIER_ATOMIC_XCHG_AT, atomic_xchg_at_func_t);
ACCESS_GENERATE_ACCESS_FUNCTION(BARRIER_ARRAYCOPY, arraycopy_func_t);
ACCESS_GENERATE_ACCESS_FUNCTION(BARRIER_CLONE, clone_func_t);
ACCESS_GENERATE_ACCESS_FUNCTION(BARRIER_RESOLVE, resolve_func_t);
#undef ACCESS_GENERATE_ACCESS_FUNCTION
template <DecoratorSet decorators, typename T, BarrierType barrier_type>
@ -391,8 +388,6 @@ public:
size_t length);
static void clone(oop src, oop dst, size_t size);
static oop resolve(oop obj) { return obj; }
};
// Below is the implementation of the first 4 steps of the template pipeline:
@ -574,18 +569,6 @@ namespace AccessInternal {
}
};
template <DecoratorSet decorators, typename T>
struct RuntimeDispatch<decorators, T, BARRIER_RESOLVE>: AllStatic {
typedef typename AccessFunction<decorators, T, BARRIER_RESOLVE>::type func_t;
static func_t _resolve_func;
static oop resolve_init(oop obj);
static inline oop resolve(oop obj) {
return _resolve_func(obj);
}
};
// Initialize the function pointers to point to the resolving function.
template <DecoratorSet decorators, typename T>
typename AccessFunction<decorators, T, BARRIER_STORE>::type
@ -627,10 +610,6 @@ namespace AccessInternal {
typename AccessFunction<decorators, T, BARRIER_CLONE>::type
RuntimeDispatch<decorators, T, BARRIER_CLONE>::_clone_func = &clone_init;
template <DecoratorSet decorators, typename T>
typename AccessFunction<decorators, T, BARRIER_RESOLVE>::type
RuntimeDispatch<decorators, T, BARRIER_RESOLVE>::_resolve_func = &resolve_init;
// Step 3: Pre-runtime dispatching.
// The PreRuntimeDispatch class is responsible for filtering the barrier strength
// decorators. That is, for AS_RAW, it hardwires the accesses without a runtime