Skip to content
Permalink
Browse files
8256727: ZGC: Clean out dead code after JDK-8212879
Reviewed-by: pliden
  • Loading branch information
stefank committed Nov 20, 2020
1 parent eb35ade commit 10ba5418465c5d3280b7113d6b902b6d4b5ca533
Showing 9 changed files with 3 additions and 68 deletions.
@@ -198,25 +198,6 @@ uintptr_t ZBarrier::mark_barrier_on_finalizable_oop_slow_path(uintptr_t addr) {
return mark<Follow, Finalizable, Overflow>(addr);
}

uintptr_t ZBarrier::mark_barrier_on_root_oop_slow_path(uintptr_t addr) {
assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
assert(during_mark(), "Invalid phase");

// Mark
return mark<Follow, Strong, Publish>(addr);
}

//
// Relocate barrier
//
uintptr_t ZBarrier::relocate_barrier_on_root_oop_slow_path(uintptr_t addr) {
assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
assert(during_relocate(), "Invalid phase");

// Relocate
return relocate(addr);
}

//
// Narrow oop variants, never used.
//
@@ -73,9 +73,6 @@ class ZBarrier : public AllStatic {

static uintptr_t mark_barrier_on_oop_slow_path(uintptr_t addr);
static uintptr_t mark_barrier_on_finalizable_oop_slow_path(uintptr_t addr);
static uintptr_t mark_barrier_on_root_oop_slow_path(uintptr_t addr);

static uintptr_t relocate_barrier_on_root_oop_slow_path(uintptr_t addr);

public:
// Load barrier
@@ -112,12 +109,8 @@ class ZBarrier : public AllStatic {
// Mark barrier
static void mark_barrier_on_oop_field(volatile oop* p, bool finalizable);
static void mark_barrier_on_oop_array(volatile oop* p, size_t length, bool finalizable);
static void mark_barrier_on_root_oop_field(oop* p);
static void mark_barrier_on_invisible_root_oop_field(oop* p);

// Relocate barrier
static void relocate_barrier_on_root_oop_field(oop* p);

// Narrow oop variants, never used.
static oop load_barrier_on_oop_field(volatile narrowOop* p);
static oop load_barrier_on_oop_field_preloaded(volatile narrowOop* p, oop o);
@@ -407,17 +407,4 @@ inline void ZBarrier::mark_barrier_on_oop_array(volatile oop* p, size_t length,
}
}

inline void ZBarrier::mark_barrier_on_root_oop_field(oop* p) {
const oop o = *p;
root_barrier<is_good_or_null_fast_path, mark_barrier_on_root_oop_slow_path>(p, o);
}

//
// Relocate barrier
//
inline void ZBarrier::relocate_barrier_on_root_oop_field(oop* p) {
const oop o = *p;
root_barrier<is_good_or_null_fast_path, relocate_barrier_on_root_oop_slow_path>(p, o);
}

#endif // SHARE_GC_Z_ZBARRIER_INLINE_HPP
@@ -25,7 +25,6 @@
#define SHARE_GC_Z_ZOOPCLOSURES_HPP

#include "memory/iterator.hpp"
#include "gc/z/zRootsIterator.hpp"

class ZLoadBarrierOopClosure : public BasicOopIterateClosure {
public:
@@ -53,11 +52,6 @@ class ZPhantomIsAliveObjectClosure : public BoolObjectClosure {
virtual bool do_object_b(oop o);
};

class ZPhantomKeepAliveOopClosure : public OopClosure {
public:
virtual void do_oop(oop* p);
virtual void do_oop(narrowOop* p);
};
class ZPhantomCleanOopClosure : public OopClosure {
public:
virtual void do_oop(oop* p);
@@ -76,14 +76,6 @@ inline bool ZPhantomIsAliveObjectClosure::do_object_b(oop o) {
return ZBarrier::is_alive_barrier_on_phantom_oop(o);
}

inline void ZPhantomKeepAliveOopClosure::do_oop(oop* p) {
ZBarrier::keep_alive_barrier_on_phantom_oop_field(p);
}

inline void ZPhantomKeepAliveOopClosure::do_oop(narrowOop* p) {
ShouldNotReachHere();
}

inline void ZPhantomCleanOopClosure::do_oop(oop* p) {
// Read the oop once, to make sure the liveness check
// and the later clearing uses the same value.
@@ -25,8 +25,7 @@
#include "gc/z/zAddress.inline.hpp"
#include "gc/z/zBarrier.inline.hpp"
#include "gc/z/zForwarding.inline.hpp"
#include "gc/z/zHeap.hpp"
#include "gc/z/zOopClosures.inline.hpp"
#include "gc/z/zHeap.inline.hpp"
#include "gc/z/zPage.inline.hpp"
#include "gc/z/zRelocate.hpp"
#include "gc/z/zRelocationSet.inline.hpp"
@@ -39,22 +38,10 @@
#include "prims/jvmtiTagMap.hpp"

static const ZStatCounter ZCounterRelocationContention("Contention", "Relocation Contention", ZStatUnitOpsPerSecond);
static const ZStatSubPhase ZSubPhasePauseRootsJVMTITagMap("Pause Roots JVMTITagMap");

ZRelocate::ZRelocate(ZWorkers* workers) :
_workers(workers) {}

class ZRelocateRootsIteratorClosure : public OopClosure {
public:
virtual void do_oop(oop* p) {
ZBarrier::relocate_barrier_on_root_oop_field(p);
}

virtual void do_oop(narrowOop* p) {
ShouldNotReachHere();
}
};

uintptr_t ZRelocate::relocate_object_inner(ZForwarding* forwarding, uintptr_t from_index, uintptr_t from_offset) const {
ZForwardingCursor cursor;

@@ -26,6 +26,7 @@

#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetNMethod.hpp"
#include "gc/shared/threadLocalAllocBuffer.hpp"
#include "gc/z/zOopClosures.hpp"
#include "memory/allocation.hpp"
#include "memory/iterator.hpp"
@@ -23,6 +23,7 @@

#include "precompiled.hpp"
#include "gc/z/zOopClosures.inline.hpp"
#include "gc/z/zRootsIterator.hpp"
#include "gc/z/zTask.hpp"
#include "gc/z/zWorkers.hpp"

@@ -33,7 +33,6 @@ class ZWeakRootsProcessor {
public:
ZWeakRootsProcessor(ZWorkers* workers);

void process_weak_roots();
void process_concurrent_weak_roots();
};

1 comment on commit 10ba541

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 10ba541 Nov 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.