8224679: Shenandoah: Make ShenandoahParallelCodeCacheIterator noncopyable

Reviewed-by: rkennke, shade
This commit is contained in:
Zhengyu Gu 2019-05-24 09:23:58 -04:00
parent 0112514fde
commit 96c9fcf22f
2 changed files with 5 additions and 20 deletions

View File

@ -245,14 +245,6 @@ void ShenandoahCodeRootsIterator::dispatch_parallel_blobs_do(CodeBlobClosure *f)
}
}
ShenandoahAllCodeRootsIterator ShenandoahCodeRoots::iterator() {
return ShenandoahAllCodeRootsIterator();
}
ShenandoahCsetCodeRootsIterator ShenandoahCodeRoots::cset_iterator() {
return ShenandoahCsetCodeRootsIterator();
}
void ShenandoahAllCodeRootsIterator::possibly_parallel_blobs_do(CodeBlobClosure *f) {
ShenandoahCodeRootsIterator::dispatch_parallel_blobs_do<false>(f);
}

View File

@ -51,6 +51,11 @@ class ShenandoahParallelCodeCacheIterator {
private:
ShenandoahParallelCodeHeapIterator* _iters;
int _length;
private:
// Noncopyable.
ShenandoahParallelCodeCacheIterator(const ShenandoahParallelCodeCacheIterator& o);
ShenandoahParallelCodeCacheIterator& operator=(const ShenandoahParallelCodeCacheIterator& o);
public:
ShenandoahParallelCodeCacheIterator(const GrowableArray<CodeHeap*>* heaps);
~ShenandoahParallelCodeCacheIterator();
@ -127,18 +132,6 @@ public:
static void add_nmethod(nmethod* nm);
static void remove_nmethod(nmethod* nm);
/**
* Provides the iterator over all nmethods in the code cache that have oops.
* @return
*/
static ShenandoahAllCodeRootsIterator iterator();
/**
* Provides the iterator over nmethods that have at least one oop in collection set.
* @return
*/
static ShenandoahCsetCodeRootsIterator cset_iterator();
private:
struct PaddedLock {
DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile int));