< prev index next >

src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.hpp

Print this page




  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_CMS_CONCURRENTMARKSWEEPGENERATION_HPP
  26 #define SHARE_VM_GC_CMS_CONCURRENTMARKSWEEPGENERATION_HPP
  27 
  28 #include "gc/cms/cmsOopClosures.hpp"
  29 #include "gc/cms/gSpaceCounters.hpp"
  30 #include "gc/cms/yieldingWorkgroup.hpp"
  31 #include "gc/shared/cardGeneration.hpp"
  32 #include "gc/shared/gcHeapSummary.hpp"
  33 #include "gc/shared/gcStats.hpp"
  34 #include "gc/shared/gcWhen.hpp"
  35 #include "gc/shared/generationCounters.hpp"
  36 #include "gc/shared/space.hpp"
  37 #include "gc/shared/taskqueue.hpp"
  38 #include "logging/log.hpp"
  39 #include "memory/iterator.hpp"
  40 #include "memory/virtualspace.hpp"

  41 #include "runtime/mutexLocker.hpp"
  42 #include "services/memoryService.hpp"
  43 #include "utilities/bitMap.hpp"
  44 #include "utilities/stack.hpp"
  45 
  46 // ConcurrentMarkSweepGeneration is in support of a concurrent
  47 // mark-sweep old generation in the Detlefs-Printezis--Boehm-Demers-Schenker
  48 // style. We assume, for now, that this generation is always the
  49 // seniormost generation and for simplicity
  50 // in the first implementation, that this generation is a single compactible
  51 // space. Neither of these restrictions appears essential, and will be
  52 // relaxed in the future when more time is available to implement the
  53 // greater generality (and there's a need for it).
  54 //
  55 // Concurrent mode failures are currently handled by
  56 // means of a sliding mark-compact.
  57 
  58 class AdaptiveSizePolicy;
  59 class CMSCollector;
  60 class CMSConcMarkingTask;


1303   bool do_bit(size_t offset);
1304   inline void do_yield_check();
1305 
1306  private:
1307   void scan_oops_in_oop(HeapWord* ptr);
1308   void do_yield_work();
1309   bool get_work_from_overflow_stack();
1310 };
1311 
1312 // The following closures are used to do certain kinds of verification of
1313 // CMS marking.
1314 class PushAndMarkVerifyClosure: public MetadataAwareOopClosure {
1315   CMSCollector*    _collector;
1316   MemRegion        _span;
1317   CMSBitMap*       _verification_bm;
1318   CMSBitMap*       _cms_bm;
1319   CMSMarkStack*    _mark_stack;
1320  protected:
1321   void do_oop(oop p);
1322   template <class T> inline void do_oop_work(T *p) {
1323     oop obj = oopDesc::load_decode_heap_oop(p);
1324     do_oop(obj);
1325   }
1326  public:
1327   PushAndMarkVerifyClosure(CMSCollector* cms_collector,
1328                            MemRegion span,
1329                            CMSBitMap* verification_bm,
1330                            CMSBitMap* cms_bm,
1331                            CMSMarkStack*  mark_stack);
1332   void do_oop(oop* p);
1333   void do_oop(narrowOop* p);
1334 
1335   // Deal with a stack overflow condition
1336   void handle_stack_overflow(HeapWord* lost);
1337 };
1338 
1339 class MarkFromRootsVerifyClosure: public BitMapClosure {
1340   CMSCollector*  _collector;
1341   MemRegion      _span;
1342   CMSBitMap*     _verification_bm;
1343   CMSBitMap*     _cms_bm;




  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_CMS_CONCURRENTMARKSWEEPGENERATION_HPP
  26 #define SHARE_VM_GC_CMS_CONCURRENTMARKSWEEPGENERATION_HPP
  27 
  28 #include "gc/cms/cmsOopClosures.hpp"
  29 #include "gc/cms/gSpaceCounters.hpp"
  30 #include "gc/cms/yieldingWorkgroup.hpp"
  31 #include "gc/shared/cardGeneration.hpp"
  32 #include "gc/shared/gcHeapSummary.hpp"
  33 #include "gc/shared/gcStats.hpp"
  34 #include "gc/shared/gcWhen.hpp"
  35 #include "gc/shared/generationCounters.hpp"
  36 #include "gc/shared/space.hpp"
  37 #include "gc/shared/taskqueue.hpp"
  38 #include "logging/log.hpp"
  39 #include "memory/iterator.hpp"
  40 #include "memory/virtualspace.hpp"
  41 #include "oops/access.inline.hpp"
  42 #include "runtime/mutexLocker.hpp"
  43 #include "services/memoryService.hpp"
  44 #include "utilities/bitMap.hpp"
  45 #include "utilities/stack.hpp"
  46 
  47 // ConcurrentMarkSweepGeneration is in support of a concurrent
  48 // mark-sweep old generation in the Detlefs-Printezis--Boehm-Demers-Schenker
  49 // style. We assume, for now, that this generation is always the
  50 // seniormost generation and for simplicity
  51 // in the first implementation, that this generation is a single compactible
  52 // space. Neither of these restrictions appears essential, and will be
  53 // relaxed in the future when more time is available to implement the
  54 // greater generality (and there's a need for it).
  55 //
  56 // Concurrent mode failures are currently handled by
  57 // means of a sliding mark-compact.
  58 
  59 class AdaptiveSizePolicy;
  60 class CMSCollector;
  61 class CMSConcMarkingTask;


1304   bool do_bit(size_t offset);
1305   inline void do_yield_check();
1306 
1307  private:
1308   void scan_oops_in_oop(HeapWord* ptr);
1309   void do_yield_work();
1310   bool get_work_from_overflow_stack();
1311 };
1312 
1313 // The following closures are used to do certain kinds of verification of
1314 // CMS marking.
1315 class PushAndMarkVerifyClosure: public MetadataAwareOopClosure {
1316   CMSCollector*    _collector;
1317   MemRegion        _span;
1318   CMSBitMap*       _verification_bm;
1319   CMSBitMap*       _cms_bm;
1320   CMSMarkStack*    _mark_stack;
1321  protected:
1322   void do_oop(oop p);
1323   template <class T> inline void do_oop_work(T *p) {
1324     oop obj = RawAccess<>::oop_load(p);
1325     do_oop(obj);
1326   }
1327  public:
1328   PushAndMarkVerifyClosure(CMSCollector* cms_collector,
1329                            MemRegion span,
1330                            CMSBitMap* verification_bm,
1331                            CMSBitMap* cms_bm,
1332                            CMSMarkStack*  mark_stack);
1333   void do_oop(oop* p);
1334   void do_oop(narrowOop* p);
1335 
1336   // Deal with a stack overflow condition
1337   void handle_stack_overflow(HeapWord* lost);
1338 };
1339 
1340 class MarkFromRootsVerifyClosure: public BitMapClosure {
1341   CMSCollector*  _collector;
1342   MemRegion      _span;
1343   CMSBitMap*     _verification_bm;
1344   CMSBitMap*     _cms_bm;


< prev index next >