< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Print this page




 145     if (!will_become_free(hr)) {
 146       *card_ptr = G1CardTable::dirty_card_val();
 147       _num_dirtied++;
 148     }
 149   }
 150 
 151   size_t num_dirtied()   const { return _num_dirtied; }
 152 };
 153 
 154 
 155 void G1RegionMappingChangedListener::reset_from_card_cache(uint start_idx, size_t num_regions) {
 156   HeapRegionRemSet::invalidate_from_card_cache(start_idx, num_regions);
 157 }
 158 
 159 void G1RegionMappingChangedListener::on_commit(uint start_idx, size_t num_regions, bool zero_filled) {
 160   // The from card cache is not the memory that is actually committed. So we cannot
 161   // take advantage of the zero_filled parameter.
 162   reset_from_card_cache(start_idx, num_regions);
 163 }
 164 
 165 void G1CollectedHeap::run_task(AbstractGangTask* task) {
 166   workers()->run_task(task, workers()->active_workers());
 167 }
 168 
 169 Tickspan G1CollectedHeap::run_task_timed(AbstractGangTask* task) {
 170   Ticks start = Ticks::now();
 171   run_task(task);
 172   return Ticks::now() - start;
 173 }
 174 
 175 HeapRegion* G1CollectedHeap::new_heap_region(uint hrs_index,
 176                                              MemRegion mr) {
 177   return new HeapRegion(hrs_index, bot(), mr);
 178 }
 179 
 180 // Private methods.
 181 
 182 HeapRegion* G1CollectedHeap::new_region(size_t word_size,
 183                                         HeapRegionType type,
 184                                         bool do_expand,
 185                                         uint node_index) {
 186   assert(!is_humongous(word_size) || word_size <= HeapRegion::GrainWords,
 187          "the only time we use this to allocate a humongous region is "
 188          "when we are allocating a single humongous region");
 189 
 190   HeapRegion* res = _hrm->allocate_free_region(type, node_index);
 191 




 145     if (!will_become_free(hr)) {
 146       *card_ptr = G1CardTable::dirty_card_val();
 147       _num_dirtied++;
 148     }
 149   }
 150 
 151   size_t num_dirtied()   const { return _num_dirtied; }
 152 };
 153 
 154 
 155 void G1RegionMappingChangedListener::reset_from_card_cache(uint start_idx, size_t num_regions) {
 156   HeapRegionRemSet::invalidate_from_card_cache(start_idx, num_regions);
 157 }
 158 
 159 void G1RegionMappingChangedListener::on_commit(uint start_idx, size_t num_regions, bool zero_filled) {
 160   // The from card cache is not the memory that is actually committed. So we cannot
 161   // take advantage of the zero_filled parameter.
 162   reset_from_card_cache(start_idx, num_regions);
 163 }
 164 




 165 Tickspan G1CollectedHeap::run_task_timed(AbstractGangTask* task) {
 166   Ticks start = Ticks::now();
 167   workers()->run_task(task);
 168   return Ticks::now() - start;
 169 }
 170 
 171 HeapRegion* G1CollectedHeap::new_heap_region(uint hrs_index,
 172                                              MemRegion mr) {
 173   return new HeapRegion(hrs_index, bot(), mr);
 174 }
 175 
 176 // Private methods.
 177 
 178 HeapRegion* G1CollectedHeap::new_region(size_t word_size,
 179                                         HeapRegionType type,
 180                                         bool do_expand,
 181                                         uint node_index) {
 182   assert(!is_humongous(word_size) || word_size <= HeapRegion::GrainWords,
 183          "the only time we use this to allocate a humongous region is "
 184          "when we are allocating a single humongous region");
 185 
 186   HeapRegion* res = _hrm->allocate_free_region(type, node_index);
 187 


< prev index next >