Skip to content
Permalink
Browse files
8254671: ZGC: Remove unused roots iterator types
Reviewed-by: stefank
  • Loading branch information
pliden committed Oct 13, 2020
1 parent 9c93490 commit 6fe209b564ab1fd29e8a47ee086799a191cbe3bb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 deletions.
@@ -29,7 +29,6 @@
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetNMethod.hpp"
#include "gc/shared/oopStorageSet.hpp"
#include "gc/shared/oopStorageParState.inline.hpp"
#include "gc/shared/oopStorageSetParState.inline.hpp"
#include "gc/shared/suspendibleThreadSet.hpp"
#include "gc/z/zBarrierSetNMethod.hpp"
@@ -62,18 +61,6 @@ static const ZStatSubPhase ZSubPhaseConcurrentRootsCodeCache("Concurrent Roots C
static const ZStatSubPhase ZSubPhasePauseWeakRootsJVMTIWeakExport("Pause Weak Roots JVMTIWeakExport");
static const ZStatSubPhase ZSubPhaseConcurrentWeakRootsOopStorageSet("Concurrent Weak Roots OopStorageSet");

template <typename T, void (T::*F)(ZRootsIteratorClosure*)>
ZSerialOopsDo<T, F>::ZSerialOopsDo(T* iter) :
_iter(iter),
_claimed(false) {}

template <typename T, void (T::*F)(ZRootsIteratorClosure*)>
void ZSerialOopsDo<T, F>::oops_do(ZRootsIteratorClosure* cl) {
if (!_claimed && Atomic::cmpxchg(&_claimed, false, true) == false) {
(_iter->*F)(cl);
}
}

template <typename T, void (T::*F)(ZRootsIteratorClosure*)>
ZParallelOopsDo<T, F>::ZParallelOopsDo(T* iter) :
_iter(iter),
@@ -101,21 +88,6 @@ void ZSerialWeakOopsDo<T, F>::weak_oops_do(BoolObjectClosure* is_alive, ZRootsIt
}
}

template <typename T, void (T::*F)(BoolObjectClosure*, ZRootsIteratorClosure*)>
ZParallelWeakOopsDo<T, F>::ZParallelWeakOopsDo(T* iter) :
_iter(iter),
_completed(false) {}

template <typename T, void (T::*F)(BoolObjectClosure*, ZRootsIteratorClosure*)>
void ZParallelWeakOopsDo<T, F>::weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl) {
if (!_completed) {
(_iter->*F)(is_alive, cl);
if (!_completed) {
_completed = true;
}
}
}

ZJavaThreadsIterator::ZJavaThreadsIterator() :
_threads(),
_claimed(0) {}
@@ -24,7 +24,6 @@
#ifndef SHARE_GC_Z_ZROOTSITERATOR_HPP
#define SHARE_GC_Z_ZROOTSITERATOR_HPP

#include "gc/shared/oopStorageParState.hpp"
#include "gc/shared/oopStorageSetParState.hpp"
#include "gc/shared/suspendibleThreadSet.hpp"
#include "memory/allocation.hpp"
@@ -35,21 +34,9 @@

class ZRootsIteratorClosure;

typedef OopStorage::ParState<true /* concurrent */, false /* is_const */> ZOopStorageIterator;
typedef OopStorageSetStrongParState<true /* concurrent */, false /* is_const */> ZOopStorageSetStrongIterator;
typedef OopStorageSetWeakParState<true /* concurrent */, false /* is_const */> ZOopStorageSetWeakIterator;

template <typename T, void (T::*F)(ZRootsIteratorClosure*)>
class ZSerialOopsDo {
private:
T* const _iter;
volatile bool _claimed;

public:
ZSerialOopsDo(T* iter);
void oops_do(ZRootsIteratorClosure* cl);
};

template <typename T, void (T::*F)(ZRootsIteratorClosure*)>
class ZParallelOopsDo {
private:
@@ -72,17 +59,6 @@ class ZSerialWeakOopsDo {
void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl);
};

template <typename T, void (T::*F)(BoolObjectClosure*, ZRootsIteratorClosure*)>
class ZParallelWeakOopsDo {
private:
T* const _iter;
volatile bool _completed;

public:
ZParallelWeakOopsDo(T* iter);
void weak_oops_do(BoolObjectClosure* is_alive, ZRootsIteratorClosure* cl);
};

class ZRootsIteratorClosure : public OopClosure {
public:
virtual void do_thread(Thread* thread) {}

1 comment on commit 6fe209b

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 6fe209b Oct 13, 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.