< prev index next >

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

Print this page




 106   // it is returned for immediate refining. Otherwise the card is
 107   // added to the hot card cache.
 108   // If there is enough room in the hot card cache for the card we're
 109   // adding, NULL is returned and no further action in needed.
 110   // If we evict a card from the cache to make room for the new card,
 111   // the evicted card is then returned for refinement.
 112   jbyte* insert(jbyte* card_ptr);
 113 
 114   // Refine the cards that have delayed as a result of
 115   // being in the cache.
 116   void drain(CardTableEntryClosure* cl, uint worker_i);
 117 
 118   // Set up for parallel processing of the cards in the hot cache
 119   void reset_hot_cache_claimed_index() {
 120     _hot_cache_par_claimed_idx = 0;
 121   }
 122 
 123   // Resets the hot card cache and discards the entries.
 124   void reset_hot_cache() {
 125     assert(SafepointSynchronize::is_at_safepoint(), "Should be at a safepoint");
 126     assert(Thread::current_noinline()->is_VM_thread(), "Current thread should be the VMthread");
 127     if (default_use_cache()) {
 128         reset_hot_cache_internal();
 129     }
 130   }
 131 
 132   // Zeros the values in the card counts table for entire committed heap
 133   void reset_card_counts();
 134 
 135   // Zeros the values in the card counts table for the given region
 136   void reset_card_counts(HeapRegion* hr);
 137 
 138  private:
 139   void reset_hot_cache_internal() {
 140     assert(_hot_cache != NULL, "Logic");
 141     _hot_cache_idx = 0;
 142     for (size_t i = 0; i < _hot_cache_size; i++) {
 143       _hot_cache[i] = NULL;
 144     }
 145   }
 146 };


 106   // it is returned for immediate refining. Otherwise the card is
 107   // added to the hot card cache.
 108   // If there is enough room in the hot card cache for the card we're
 109   // adding, NULL is returned and no further action in needed.
 110   // If we evict a card from the cache to make room for the new card,
 111   // the evicted card is then returned for refinement.
 112   jbyte* insert(jbyte* card_ptr);
 113 
 114   // Refine the cards that have delayed as a result of
 115   // being in the cache.
 116   void drain(CardTableEntryClosure* cl, uint worker_i);
 117 
 118   // Set up for parallel processing of the cards in the hot cache
 119   void reset_hot_cache_claimed_index() {
 120     _hot_cache_par_claimed_idx = 0;
 121   }
 122 
 123   // Resets the hot card cache and discards the entries.
 124   void reset_hot_cache() {
 125     assert(SafepointSynchronize::is_at_safepoint(), "Should be at a safepoint");
 126     assert(Thread::current()->is_VM_thread(), "Current thread should be the VMthread");
 127     if (default_use_cache()) {
 128         reset_hot_cache_internal();
 129     }
 130   }
 131 
 132   // Zeros the values in the card counts table for entire committed heap
 133   void reset_card_counts();
 134 
 135   // Zeros the values in the card counts table for the given region
 136   void reset_card_counts(HeapRegion* hr);
 137 
 138  private:
 139   void reset_hot_cache_internal() {
 140     assert(_hot_cache != NULL, "Logic");
 141     _hot_cache_idx = 0;
 142     for (size_t i = 0; i < _hot_cache_size; i++) {
 143       _hot_cache[i] = NULL;
 144     }
 145   }
 146 };
< prev index next >