Skip to content

Commit 7eccbd4

Browse files
committed
8266519: Cleanup resolve() leftovers from BarrierSet et al
Reviewed-by: kbarrett, stefank
1 parent 9569159 commit 7eccbd4

File tree

4 files changed

+1
-41
lines changed

4 files changed

+1
-41
lines changed

src/hotspot/share/gc/shared/barrierSet.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,6 @@ class BarrierSet: public CHeapObj<mtGC> {
310310
static void clone_in_heap(oop src, oop dst, size_t size) {
311311
Raw::clone(src, dst, size);
312312
}
313-
314-
static oop resolve(oop obj) {
315-
return Raw::resolve(obj);
316-
}
317313
};
318314
};
319315

src/hotspot/share/oops/access.hpp

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

src/hotspot/share/oops/access.inline.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,6 @@ namespace AccessInternal {
200200
}
201201
};
202202

203-
template <class GCBarrierType, DecoratorSet decorators>
204-
struct PostRuntimeDispatch<GCBarrierType, BARRIER_RESOLVE, decorators>: public AllStatic {
205-
static oop access_barrier(oop obj) {
206-
return GCBarrierType::resolve(obj);
207-
}
208-
};
209-
210203
// Resolving accessors with barriers from the barrier set happens in two steps.
211204
// 1. Expand paths with runtime-decorators, e.g. is UseCompressedOops on or off.
212205
// 2. Expand paths for each BarrierSet available in the system.
@@ -354,13 +347,6 @@ namespace AccessInternal {
354347
_clone_func = function;
355348
function(src, dst, size);
356349
}
357-
358-
template <DecoratorSet decorators, typename T>
359-
oop RuntimeDispatch<decorators, T, BARRIER_RESOLVE>::resolve_init(oop obj) {
360-
func_t function = BarrierResolver<decorators, func_t, BARRIER_RESOLVE>::resolve_barrier();
361-
_resolve_func = function;
362-
return function(obj);
363-
}
364350
}
365351

366352
#endif // SHARE_OOPS_ACCESS_INLINE_HPP

src/hotspot/share/oops/accessBackend.hpp

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ namespace AccessInternal {
6363
BARRIER_ATOMIC_XCHG,
6464
BARRIER_ATOMIC_XCHG_AT,
6565
BARRIER_ARRAYCOPY,
66-
BARRIER_CLONE,
67-
BARRIER_RESOLVE
66+
BARRIER_CLONE
6867
};
6968

7069
template <DecoratorSet decorators, typename T>
@@ -114,7 +113,6 @@ namespace AccessInternal {
114113
arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
115114
size_t length);
116115
typedef void (*clone_func_t)(oop src, oop dst, size_t size);
117-
typedef oop (*resolve_func_t)(oop obj);
118116
};
119117

120118
template <DecoratorSet decorators>
@@ -141,7 +139,6 @@ namespace AccessInternal {
141139
ACCESS_GENERATE_ACCESS_FUNCTION(BARRIER_ATOMIC_XCHG_AT, atomic_xchg_at_func_t);
142140
ACCESS_GENERATE_ACCESS_FUNCTION(BARRIER_ARRAYCOPY, arraycopy_func_t);
143141
ACCESS_GENERATE_ACCESS_FUNCTION(BARRIER_CLONE, clone_func_t);
144-
ACCESS_GENERATE_ACCESS_FUNCTION(BARRIER_RESOLVE, resolve_func_t);
145142
#undef ACCESS_GENERATE_ACCESS_FUNCTION
146143

147144
template <DecoratorSet decorators, typename T, BarrierType barrier_type>
@@ -391,8 +388,6 @@ class RawAccessBarrier: public AllStatic {
391388
size_t length);
392389

393390
static void clone(oop src, oop dst, size_t size);
394-
395-
static oop resolve(oop obj) { return obj; }
396391
};
397392

398393
// Below is the implementation of the first 4 steps of the template pipeline:
@@ -574,18 +569,6 @@ namespace AccessInternal {
574569
}
575570
};
576571

577-
template <DecoratorSet decorators, typename T>
578-
struct RuntimeDispatch<decorators, T, BARRIER_RESOLVE>: AllStatic {
579-
typedef typename AccessFunction<decorators, T, BARRIER_RESOLVE>::type func_t;
580-
static func_t _resolve_func;
581-
582-
static oop resolve_init(oop obj);
583-
584-
static inline oop resolve(oop obj) {
585-
return _resolve_func(obj);
586-
}
587-
};
588-
589572
// Initialize the function pointers to point to the resolving function.
590573
template <DecoratorSet decorators, typename T>
591574
typename AccessFunction<decorators, T, BARRIER_STORE>::type
@@ -627,10 +610,6 @@ namespace AccessInternal {
627610
typename AccessFunction<decorators, T, BARRIER_CLONE>::type
628611
RuntimeDispatch<decorators, T, BARRIER_CLONE>::_clone_func = &clone_init;
629612

630-
template <DecoratorSet decorators, typename T>
631-
typename AccessFunction<decorators, T, BARRIER_RESOLVE>::type
632-
RuntimeDispatch<decorators, T, BARRIER_RESOLVE>::_resolve_func = &resolve_init;
633-
634613
// Step 3: Pre-runtime dispatching.
635614
// The PreRuntimeDispatch class is responsible for filtering the barrier strength
636615
// decorators. That is, for AS_RAW, it hardwires the accesses without a runtime

0 commit comments

Comments
 (0)