< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp

Print this page
rev 57095 : [mq]: use
rev 57096 : [mq]: trailing_semi


  16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHHEAP_HPP
  25 #define SHARE_GC_SHENANDOAH_SHENANDOAHHEAP_HPP
  26 
  27 #include "gc/shared/markBitMap.hpp"
  28 #include "gc/shared/softRefPolicy.hpp"
  29 #include "gc/shared/collectedHeap.hpp"
  30 #include "gc/shenandoah/shenandoahAsserts.hpp"
  31 #include "gc/shenandoah/shenandoahAllocRequest.hpp"
  32 #include "gc/shenandoah/shenandoahLock.hpp"
  33 #include "gc/shenandoah/shenandoahEvacOOMHandler.hpp"
  34 #include "gc/shenandoah/shenandoahSharedVariables.hpp"
  35 #include "services/memoryManager.hpp"

  36 
  37 class ConcurrentGCTimer;
  38 class ReferenceProcessor;
  39 class ShenandoahAllocTracker;
  40 class ShenandoahCollectorPolicy;
  41 class ShenandoahControlThread;
  42 class ShenandoahGCSession;
  43 class ShenandoahGCStateResetter;
  44 class ShenandoahHeuristics;
  45 class ShenandoahMarkingContext;
  46 class ShenandoahMarkCompact;
  47 class ShenandoahMode;
  48 class ShenandoahPhaseTimings;
  49 class ShenandoahHeap;
  50 class ShenandoahHeapRegion;
  51 class ShenandoahHeapRegionClosure;
  52 class ShenandoahCollectionSet;
  53 class ShenandoahFreeSet;
  54 class ShenandoahConcurrentMark;
  55 class ShenandoahMarkCompact;
  56 class ShenandoahMonitoringSupport;
  57 class ShenandoahPacer;
  58 class ShenandoahTraversalGC;
  59 class ShenandoahVerifier;
  60 class ShenandoahWorkGang;
  61 class VMStructs;
  62 
  63 class ShenandoahRegionIterator : public StackObj {
  64 private:
  65   ShenandoahHeap* _heap;
  66 
  67   DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile size_t));
  68   volatile size_t _index;
  69   DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, 0);
  70 
  71   // No implicit copying: iterators should be passed by reference to capture the state
  72   ShenandoahRegionIterator(const ShenandoahRegionIterator& that);
  73   ShenandoahRegionIterator& operator=(const ShenandoahRegionIterator& o);
  74 
  75 public:
  76   ShenandoahRegionIterator();
  77   ShenandoahRegionIterator(ShenandoahHeap* heap);
  78 
  79   // Reset iterator to default state
  80   void reset();
  81 
  82   // Returns next region, or NULL if there are no more regions.
  83   // This is multi-thread-safe.
  84   inline ShenandoahHeapRegion* next();
  85 
  86   // This is *not* MT safe. However, in the absence of multithreaded access, it
  87   // can be used to determine if there is more work to do.
  88   bool has_next() const;
  89 };
  90 
  91 class ShenandoahHeapRegionClosure : public StackObj {
  92 public:
  93   virtual void heap_region_do(ShenandoahHeapRegion* r) = 0;




  16  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  17  *
  18  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  19  * or visit www.oracle.com if you need additional information or have any
  20  * questions.
  21  *
  22  */
  23 
  24 #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHHEAP_HPP
  25 #define SHARE_GC_SHENANDOAH_SHENANDOAHHEAP_HPP
  26 
  27 #include "gc/shared/markBitMap.hpp"
  28 #include "gc/shared/softRefPolicy.hpp"
  29 #include "gc/shared/collectedHeap.hpp"
  30 #include "gc/shenandoah/shenandoahAsserts.hpp"
  31 #include "gc/shenandoah/shenandoahAllocRequest.hpp"
  32 #include "gc/shenandoah/shenandoahLock.hpp"
  33 #include "gc/shenandoah/shenandoahEvacOOMHandler.hpp"
  34 #include "gc/shenandoah/shenandoahSharedVariables.hpp"
  35 #include "services/memoryManager.hpp"
  36 #include "utilities/macros.hpp"
  37 
  38 class ConcurrentGCTimer;
  39 class ReferenceProcessor;
  40 class ShenandoahAllocTracker;
  41 class ShenandoahCollectorPolicy;
  42 class ShenandoahControlThread;
  43 class ShenandoahGCSession;
  44 class ShenandoahGCStateResetter;
  45 class ShenandoahHeuristics;
  46 class ShenandoahMarkingContext;
  47 class ShenandoahMarkCompact;
  48 class ShenandoahMode;
  49 class ShenandoahPhaseTimings;
  50 class ShenandoahHeap;
  51 class ShenandoahHeapRegion;
  52 class ShenandoahHeapRegionClosure;
  53 class ShenandoahCollectionSet;
  54 class ShenandoahFreeSet;
  55 class ShenandoahConcurrentMark;
  56 class ShenandoahMarkCompact;
  57 class ShenandoahMonitoringSupport;
  58 class ShenandoahPacer;
  59 class ShenandoahTraversalGC;
  60 class ShenandoahVerifier;
  61 class ShenandoahWorkGang;
  62 class VMStructs;
  63 
  64 class ShenandoahRegionIterator : public StackObj {
  65 private:
  66   ShenandoahHeap* _heap;
  67 
  68   DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile size_t));
  69   volatile size_t _index;
  70   DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, 0);
  71 
  72   // No implicit copying: iterators should be passed by reference to capture the state
  73   NONCOPYABLE(ShenandoahRegionIterator);

  74 
  75 public:
  76   ShenandoahRegionIterator();
  77   ShenandoahRegionIterator(ShenandoahHeap* heap);
  78 
  79   // Reset iterator to default state
  80   void reset();
  81 
  82   // Returns next region, or NULL if there are no more regions.
  83   // This is multi-thread-safe.
  84   inline ShenandoahHeapRegion* next();
  85 
  86   // This is *not* MT safe. However, in the absence of multithreaded access, it
  87   // can be used to determine if there is more work to do.
  88   bool has_next() const;
  89 };
  90 
  91 class ShenandoahHeapRegionClosure : public StackObj {
  92 public:
  93   virtual void heap_region_do(ShenandoahHeapRegion* r) = 0;


< prev index next >