< prev index next >

src/share/vm/gc/g1/g1RemSet.hpp

Print this page




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1REMSET_HPP
  26 #define SHARE_VM_GC_G1_G1REMSET_HPP
  27 
  28 #include "gc/g1/dirtyCardQueue.hpp"
  29 #include "gc/g1/g1RemSetSummary.hpp"
  30 #include "gc/g1/heapRegion.hpp"
  31 #include "memory/allocation.hpp"
  32 #include "memory/iterator.hpp"
  33 
  34 // A G1RemSet provides ways of iterating over pointers into a selected
  35 // collection set.
  36 
  37 class BitMap;
  38 class CardTableModRefBS;
  39 class G1BlockOffsetSharedArray;
  40 class ConcurrentG1Refine;
  41 class CodeBlobClosure;
  42 class G1CollectedHeap;
  43 class G1CollectorPolicy;
  44 class G1ParPushHeapRSClosure;
  45 class G1SATBCardTableModRefBS;
  46 class HeapRegionClaimer;
  47 
  48 // A G1RemSet in which each heap region has a rem set that records the
  49 // external heap references into it.  Uses a mod ref bs to track updates,
  50 // so that they can be used to update the individual region remsets.
  51 
  52 class G1RemSet: public CHeapObj<mtGC> {
  53 private:
  54   G1RemSetSummary _prev_period_summary;
  55 
  56   // A DirtyCardQueueSet that is used to hold cards that contain
  57   // references into the current collection set. This is used to
  58   // update the remembered sets of the regions in the collection
  59   // set in the event of an evacuation failure.


 154   virtual void print_summary_info();
 155 
 156   // Print accumulated summary info from the last time called.
 157   virtual void print_periodic_summary_info(const char* header, uint period_count);
 158 
 159   // Prepare remembered set for verification.
 160   virtual void prepare_for_verify();
 161 
 162   size_t conc_refine_cards() const {
 163     return _conc_refine_cards;
 164   }
 165 };
 166 
 167 class ScanRSClosure : public HeapRegionClosure {
 168   size_t _cards_done, _cards;
 169   G1CollectedHeap* _g1h;
 170 
 171   G1ParPushHeapRSClosure* _oc;
 172   CodeBlobClosure* _code_root_cl;
 173 
 174   G1BlockOffsetSharedArray* _bot_shared;
 175   G1SATBCardTableModRefBS *_ct_bs;
 176 
 177   double _strong_code_root_scan_time_sec;
 178   uint   _worker_i;
 179   size_t _block_size;
 180   bool   _try_claimed;
 181 
 182 public:
 183   ScanRSClosure(G1ParPushHeapRSClosure* oc,
 184                 CodeBlobClosure* code_root_cl,
 185                 uint worker_i);
 186 
 187   bool doHeapRegion(HeapRegion* r);
 188 
 189   double strong_code_root_scan_time_sec() {
 190     return _strong_code_root_scan_time_sec;
 191   }
 192   size_t cards_done() { return _cards_done;}
 193   size_t cards_looked_up() { return _cards;}
 194   void set_try_claimed() { _try_claimed = true; }




  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1REMSET_HPP
  26 #define SHARE_VM_GC_G1_G1REMSET_HPP
  27 
  28 #include "gc/g1/dirtyCardQueue.hpp"
  29 #include "gc/g1/g1RemSetSummary.hpp"
  30 #include "gc/g1/heapRegion.hpp"
  31 #include "memory/allocation.hpp"
  32 #include "memory/iterator.hpp"
  33 
  34 // A G1RemSet provides ways of iterating over pointers into a selected
  35 // collection set.
  36 
  37 class BitMap;
  38 class CardTableModRefBS;
  39 class G1BlockOffsetTable;
  40 class ConcurrentG1Refine;
  41 class CodeBlobClosure;
  42 class G1CollectedHeap;
  43 class G1CollectorPolicy;
  44 class G1ParPushHeapRSClosure;
  45 class G1SATBCardTableModRefBS;
  46 class HeapRegionClaimer;
  47 
  48 // A G1RemSet in which each heap region has a rem set that records the
  49 // external heap references into it.  Uses a mod ref bs to track updates,
  50 // so that they can be used to update the individual region remsets.
  51 
  52 class G1RemSet: public CHeapObj<mtGC> {
  53 private:
  54   G1RemSetSummary _prev_period_summary;
  55 
  56   // A DirtyCardQueueSet that is used to hold cards that contain
  57   // references into the current collection set. This is used to
  58   // update the remembered sets of the regions in the collection
  59   // set in the event of an evacuation failure.


 154   virtual void print_summary_info();
 155 
 156   // Print accumulated summary info from the last time called.
 157   virtual void print_periodic_summary_info(const char* header, uint period_count);
 158 
 159   // Prepare remembered set for verification.
 160   virtual void prepare_for_verify();
 161 
 162   size_t conc_refine_cards() const {
 163     return _conc_refine_cards;
 164   }
 165 };
 166 
 167 class ScanRSClosure : public HeapRegionClosure {
 168   size_t _cards_done, _cards;
 169   G1CollectedHeap* _g1h;
 170 
 171   G1ParPushHeapRSClosure* _oc;
 172   CodeBlobClosure* _code_root_cl;
 173 
 174   G1BlockOffsetTable* _bot;
 175   G1SATBCardTableModRefBS *_ct_bs;
 176 
 177   double _strong_code_root_scan_time_sec;
 178   uint   _worker_i;
 179   size_t _block_size;
 180   bool   _try_claimed;
 181 
 182 public:
 183   ScanRSClosure(G1ParPushHeapRSClosure* oc,
 184                 CodeBlobClosure* code_root_cl,
 185                 uint worker_i);
 186 
 187   bool doHeapRegion(HeapRegion* r);
 188 
 189   double strong_code_root_scan_time_sec() {
 190     return _strong_code_root_scan_time_sec;
 191   }
 192   size_t cards_done() { return _cards_done;}
 193   size_t cards_looked_up() { return _cards;}
 194   void set_try_claimed() { _try_claimed = true; }


< prev index next >