mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-02 19:20:19 +00:00
8042209: Remove unused function G1SATBCardTableLoggingModRefBS::write_ref_field_static
Reviewed-by: mgerdin, tschatzl
This commit is contained in:
parent
4a65cc4f5b
commit
6f81963972
@ -188,21 +188,6 @@ G1SATBCardTableLoggingModRefBS::write_ref_field_work(void* field,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
G1SATBCardTableLoggingModRefBS::write_ref_field_static(void* field,
|
||||
oop new_val) {
|
||||
uintptr_t field_uint = (uintptr_t)field;
|
||||
uintptr_t new_val_uint = cast_from_oop<uintptr_t>(new_val);
|
||||
uintptr_t comb = field_uint ^ new_val_uint;
|
||||
comb = comb >> HeapRegion::LogOfHRGrainBytes;
|
||||
if (comb == 0) return;
|
||||
if (new_val == NULL) return;
|
||||
// Otherwise, log it.
|
||||
G1SATBCardTableLoggingModRefBS* g1_bs =
|
||||
barrier_set_cast<G1SATBCardTableLoggingModRefBS>(G1CollectedHeap::heap()->barrier_set());
|
||||
g1_bs->write_ref_field_work(field, new_val, false);
|
||||
}
|
||||
|
||||
void
|
||||
G1SATBCardTableLoggingModRefBS::invalidate(MemRegion mr, bool whole_heap) {
|
||||
volatile jbyte* byte = byte_for(mr.start());
|
||||
|
||||
@ -56,21 +56,15 @@ public:
|
||||
|
||||
virtual bool has_write_ref_pre_barrier() { return true; }
|
||||
|
||||
// This notes that we don't need to access any BarrierSet data
|
||||
// structures, so this can be called from a static context.
|
||||
template <class T> static void write_ref_field_pre_static(T* field, oop newVal) {
|
||||
// We export this to make it available in cases where the static
|
||||
// type of the barrier set is known. Note that it is non-virtual.
|
||||
template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {
|
||||
T heap_oop = oopDesc::load_heap_oop(field);
|
||||
if (!oopDesc::is_null(heap_oop)) {
|
||||
enqueue(oopDesc::decode_heap_oop(heap_oop));
|
||||
}
|
||||
}
|
||||
|
||||
// We export this to make it available in cases where the static
|
||||
// type of the barrier set is known. Note that it is non-virtual.
|
||||
template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {
|
||||
write_ref_field_pre_static(field, newVal);
|
||||
}
|
||||
|
||||
// These are the more general virtual versions.
|
||||
virtual void write_ref_field_pre_work(oop* field, oop new_val) {
|
||||
inline_write_ref_field_pre(field, new_val);
|
||||
@ -173,9 +167,6 @@ class G1SATBCardTableLoggingModRefBS: public G1SATBCardTableModRefBS {
|
||||
|
||||
virtual void resize_covered_region(MemRegion new_region) { ShouldNotReachHere(); }
|
||||
|
||||
// Can be called from static contexts.
|
||||
static void write_ref_field_static(void* field, oop new_val);
|
||||
|
||||
// NB: if you do a whole-heap invalidation, the "usual invariant" defined
|
||||
// above no longer applies.
|
||||
void invalidate(MemRegion mr, bool whole_heap = false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user