< prev index next >

src/hotspot/share/gc/g1/g1FullCollector.hpp

Print this page
rev 49912 : imported patch 8201492-properly-implement-non-contiguous-reference-processing
rev 49914 : [mq]: 8201492-kim-review


  25 #ifndef SHARE_GC_G1_G1FULLCOLLECTOR_HPP
  26 #define SHARE_GC_G1_G1FULLCOLLECTOR_HPP
  27 
  28 #include "gc/g1/g1FullGCCompactionPoint.hpp"
  29 #include "gc/g1/g1FullGCMarker.hpp"
  30 #include "gc/g1/g1FullGCOopClosures.hpp"
  31 #include "gc/g1/g1FullGCScope.hpp"
  32 #include "gc/shared/preservedMarks.hpp"
  33 #include "gc/shared/referenceProcessor.hpp"
  34 #include "gc/shared/taskqueue.hpp"
  35 #include "memory/allocation.hpp"
  36 
  37 class AbstractGangTask;
  38 class G1CMBitMap;
  39 class G1FullGCMarker;
  40 class G1FullGCScope;
  41 class G1FullGCCompactionPoint;
  42 class GCMemoryManager;
  43 class ReferenceProcessor;
  44 










  45 // The G1FullCollector holds data associated with the current Full GC.
  46 class G1FullCollector : StackObj {
  47   G1CollectedHeap*          _heap;
  48   G1FullGCScope             _scope;
  49   uint                      _num_workers;
  50   G1FullGCMarker**          _markers;
  51   G1FullGCCompactionPoint** _compaction_points;
  52   OopQueueSet               _oop_queue_set;
  53   ObjArrayTaskQueueSet      _array_queue_set;
  54   PreservedMarksSet         _preserved_marks_set;
  55   G1FullGCCompactionPoint   _serial_compaction_point;
  56   G1IsAliveClosure          _is_alive;
  57   ReferenceProcessorIsAliveMutator _is_alive_mutator;
  58 
  59   static uint calc_active_workers();



  60 
  61 public:
  62   G1FullCollector(G1CollectedHeap* heap, GCMemoryManager* memory_manager, bool explicit_gc, bool clear_soft_refs);
  63   ~G1FullCollector();
  64 
  65   void prepare_collection();
  66   void collect();
  67   void complete_collection();
  68 
  69   G1FullGCScope*           scope() { return &_scope; }
  70   uint                     workers() { return _num_workers; }
  71   G1FullGCMarker*          marker(uint id) { return _markers[id]; }
  72   G1FullGCCompactionPoint* compaction_point(uint id) { return _compaction_points[id]; }
  73   OopQueueSet*             oop_queue_set() { return &_oop_queue_set; }
  74   ObjArrayTaskQueueSet*    array_queue_set() { return &_array_queue_set; }
  75   PreservedMarksSet*       preserved_mark_set() { return &_preserved_marks_set; }
  76   G1FullGCCompactionPoint* serial_compaction_point() { return &_serial_compaction_point; }
  77   G1CMBitMap*              mark_bitmap();
  78   ReferenceProcessor*      reference_processor();
  79 


  25 #ifndef SHARE_GC_G1_G1FULLCOLLECTOR_HPP
  26 #define SHARE_GC_G1_G1FULLCOLLECTOR_HPP
  27 
  28 #include "gc/g1/g1FullGCCompactionPoint.hpp"
  29 #include "gc/g1/g1FullGCMarker.hpp"
  30 #include "gc/g1/g1FullGCOopClosures.hpp"
  31 #include "gc/g1/g1FullGCScope.hpp"
  32 #include "gc/shared/preservedMarks.hpp"
  33 #include "gc/shared/referenceProcessor.hpp"
  34 #include "gc/shared/taskqueue.hpp"
  35 #include "memory/allocation.hpp"
  36 
  37 class AbstractGangTask;
  38 class G1CMBitMap;
  39 class G1FullGCMarker;
  40 class G1FullGCScope;
  41 class G1FullGCCompactionPoint;
  42 class GCMemoryManager;
  43 class ReferenceProcessor;
  44 
  45 // Subject-to-discovery closure for reference processing during Full GC. During
  46 // Full GC the whole heap is subject to discovery.
  47 class G1FullGCSubjectToDiscoveryClosure: public BoolObjectClosure {
  48 public:
  49   bool do_object_b(oop p) {
  50     assert(p != NULL, "must be");
  51     return true;
  52   }
  53 };
  54 
  55 // The G1FullCollector holds data associated with the current Full GC.
  56 class G1FullCollector : StackObj {
  57   G1CollectedHeap*          _heap;
  58   G1FullGCScope             _scope;
  59   uint                      _num_workers;
  60   G1FullGCMarker**          _markers;
  61   G1FullGCCompactionPoint** _compaction_points;
  62   OopQueueSet               _oop_queue_set;
  63   ObjArrayTaskQueueSet      _array_queue_set;
  64   PreservedMarksSet         _preserved_marks_set;
  65   G1FullGCCompactionPoint   _serial_compaction_point;
  66   G1IsAliveClosure          _is_alive;
  67   ReferenceProcessorIsAliveMutator _is_alive_mutator;
  68 
  69   static uint calc_active_workers();
  70 
  71   G1FullGCSubjectToDiscoveryClosure _always_subject_to_discovery;
  72   ReferenceProcessorSubjectToDiscoveryMutator _is_subject_mutator;
  73 
  74 public:
  75   G1FullCollector(G1CollectedHeap* heap, GCMemoryManager* memory_manager, bool explicit_gc, bool clear_soft_refs);
  76   ~G1FullCollector();
  77 
  78   void prepare_collection();
  79   void collect();
  80   void complete_collection();
  81 
  82   G1FullGCScope*           scope() { return &_scope; }
  83   uint                     workers() { return _num_workers; }
  84   G1FullGCMarker*          marker(uint id) { return _markers[id]; }
  85   G1FullGCCompactionPoint* compaction_point(uint id) { return _compaction_points[id]; }
  86   OopQueueSet*             oop_queue_set() { return &_oop_queue_set; }
  87   ObjArrayTaskQueueSet*    array_queue_set() { return &_array_queue_set; }
  88   PreservedMarksSet*       preserved_mark_set() { return &_preserved_marks_set; }
  89   G1FullGCCompactionPoint* serial_compaction_point() { return &_serial_compaction_point; }
  90   G1CMBitMap*              mark_bitmap();
  91   ReferenceProcessor*      reference_processor();
  92 
< prev index next >