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

Print this page
rev 6872 : imported patch nm-hashtable


  79   void cleanupHRRS();
  80 
  81   G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs);
  82   ~G1RemSet();
  83 
  84   // Invoke "blk->do_oop" on all pointers into the collection set
  85   // from objects in regions outside the collection set (having
  86   // invoked "blk->set_region" to set the "from" region correctly
  87   // beforehand.)
  88   //
  89   // Invoke code_root_cl->do_code_blob on the unmarked nmethods
  90   // on the strong code roots list for each region in the
  91   // collection set.
  92   //
  93   // The "worker_i" param is for the parallel case where the id
  94   // of the worker thread calling this function can be helpful in
  95   // partitioning the work to be done. It should be the same as
  96   // the "i" passed to the calling thread's work(i) function.
  97   // In the sequential case this param will be ignored.
  98   void oops_into_collection_set_do(OopsInHeapRegionClosure* blk,
  99                                    CodeBlobToOopClosure* code_root_cl,
 100                                    uint worker_i);
 101 
 102   // Prepare for and cleanup after an oops_into_collection_set_do
 103   // call.  Must call each of these once before and after (in sequential
 104   // code) any threads call oops_into_collection_set_do.  (This offers an
 105   // opportunity to sequential setup and teardown of structures needed by a
 106   // parallel iteration over the CS's RS.)
 107   void prepare_for_oops_into_collection_set_do();
 108   void cleanup_after_oops_into_collection_set_do();
 109 
 110   void scanRS(OopsInHeapRegionClosure* oc,
 111               CodeBlobToOopClosure* code_root_cl,
 112               uint worker_i);
 113 
 114   void updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i);
 115 
 116   CardTableModRefBS* ct_bs() { return _ct_bs; }
 117   size_t cardsScanned() { return _total_cards_scanned; }
 118 
 119   // Record, if necessary, the fact that *p (where "p" is in region "from",
 120   // which is required to be non-NULL) has changed to a new non-NULL value.
 121   template <class T> void write_ref(HeapRegion* from, T* p);
 122   template <class T> void par_write_ref(HeapRegion* from, T* p, int tid);
 123 
 124   // Requires "region_bm" and "card_bm" to be bitmaps with 1 bit per region
 125   // or card, respectively, such that a region or card with a corresponding
 126   // 0 bit contains no part of any live object.  Eliminates any remembered
 127   // set entries that correspond to dead heap ranges.
 128   void scrub(BitMap* region_bm, BitMap* card_bm);
 129 
 130   // Like the above, but assumes is called in parallel: "worker_num" is the
 131   // parallel thread id of the current thread, and "claim_val" is the




  79   void cleanupHRRS();
  80 
  81   G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs);
  82   ~G1RemSet();
  83 
  84   // Invoke "blk->do_oop" on all pointers into the collection set
  85   // from objects in regions outside the collection set (having
  86   // invoked "blk->set_region" to set the "from" region correctly
  87   // beforehand.)
  88   //
  89   // Invoke code_root_cl->do_code_blob on the unmarked nmethods
  90   // on the strong code roots list for each region in the
  91   // collection set.
  92   //
  93   // The "worker_i" param is for the parallel case where the id
  94   // of the worker thread calling this function can be helpful in
  95   // partitioning the work to be done. It should be the same as
  96   // the "i" passed to the calling thread's work(i) function.
  97   // In the sequential case this param will be ignored.
  98   void oops_into_collection_set_do(OopsInHeapRegionClosure* blk,
  99                                    CodeBlobClosure* code_root_cl,
 100                                    uint worker_i);
 101 
 102   // Prepare for and cleanup after an oops_into_collection_set_do
 103   // call.  Must call each of these once before and after (in sequential
 104   // code) any threads call oops_into_collection_set_do.  (This offers an
 105   // opportunity to sequential setup and teardown of structures needed by a
 106   // parallel iteration over the CS's RS.)
 107   void prepare_for_oops_into_collection_set_do();
 108   void cleanup_after_oops_into_collection_set_do();
 109 
 110   void scanRS(OopsInHeapRegionClosure* oc,
 111               CodeBlobClosure* code_root_cl,
 112               uint worker_i);
 113 
 114   void updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i);
 115 
 116   CardTableModRefBS* ct_bs() { return _ct_bs; }
 117   size_t cardsScanned() { return _total_cards_scanned; }
 118 
 119   // Record, if necessary, the fact that *p (where "p" is in region "from",
 120   // which is required to be non-NULL) has changed to a new non-NULL value.
 121   template <class T> void write_ref(HeapRegion* from, T* p);
 122   template <class T> void par_write_ref(HeapRegion* from, T* p, int tid);
 123 
 124   // Requires "region_bm" and "card_bm" to be bitmaps with 1 bit per region
 125   // or card, respectively, such that a region or card with a corresponding
 126   // 0 bit contains no part of any live object.  Eliminates any remembered
 127   // set entries that correspond to dead heap ranges.
 128   void scrub(BitMap* region_bm, BitMap* card_bm);
 129 
 130   // Like the above, but assumes is called in parallel: "worker_num" is the
 131   // parallel thread id of the current thread, and "claim_val" is the