8224679: Shenandoah: Make ShenandoahParallelCodeCacheIterator noncopyable
authorzgu
Fri, 24 May 2019 09:23:58 -0400
changeset 55028 da5435d9a801
parent 55027 adb2493b120e
child 55029 fc66237d5eae
8224679: Shenandoah: Make ShenandoahParallelCodeCacheIterator noncopyable Reviewed-by: rkennke, shade
src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp
src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp	Fri May 24 12:25:18 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp	Fri May 24 09:23:58 2019 -0400
@@ -245,14 +245,6 @@
   }
 }
 
-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);
 }
--- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp	Fri May 24 12:25:18 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp	Fri May 24 09:23:58 2019 -0400
@@ -51,6 +51,11 @@
 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 @@
   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));