< prev index next >

src/hotspot/share/gc/g1/g1CollectedHeap.inline.hpp

Print this page




 146 inline bool G1CollectedHeap::is_marked_next(oop obj) const {
 147   return _cm->next_mark_bitmap()->is_marked((HeapWord*)obj);
 148 }
 149 
 150 inline bool G1CollectedHeap::is_in_cset(oop obj) {
 151   return is_in_cset((HeapWord*)obj);
 152 }
 153 
 154 inline bool G1CollectedHeap::is_in_cset(HeapWord* addr) {
 155   return _region_attr.is_in_cset(addr);
 156 }
 157 
 158 bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) {
 159   return _region_attr.is_in_cset(hr);
 160 }
 161 
 162 bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {
 163   return _region_attr.is_in_cset_or_humongous((HeapWord*)obj);
 164 }
 165 
 166 G1HeapRegionAttr G1CollectedHeap::region_attr(const void* addr) const {
 167   return _region_attr.at((HeapWord*)addr);
 168 }
 169 
 170 G1HeapRegionAttr G1CollectedHeap::region_attr(uint idx) const {
 171   return _region_attr.get_by_index(idx);
 172 }
 173 
 174 void G1CollectedHeap::register_humongous_region_with_region_attr(uint index) {
 175   _region_attr.set_humongous(index, region_at(index)->rem_set()->is_tracked());
 176 }
 177 
 178 void G1CollectedHeap::register_region_with_region_attr(HeapRegion* r) {
 179   _region_attr.set_has_remset(r->hrm_index(), r->rem_set()->is_tracked());
 180 }
 181 
 182 void G1CollectedHeap::register_old_region_with_region_attr(HeapRegion* r) {
 183   _region_attr.set_in_old(r->hrm_index(), r->rem_set()->is_tracked());
 184   _rem_set->prepare_for_scan_heap_roots(r->hrm_index());
 185 }
 186 
 187 void G1CollectedHeap::register_optional_region_with_region_attr(HeapRegion* r) {
 188   _region_attr.set_optional(r->hrm_index(), r->rem_set()->is_tracked());
 189 }
 190 
 191 #ifndef PRODUCT
 192 // Support for G1EvacuationFailureALot
 193 
 194 inline bool
 195 G1CollectedHeap::evacuation_failure_alot_for_gc_type(bool for_young_gc,
 196                                                      bool during_initial_mark,
 197                                                      bool mark_or_rebuild_in_progress) {
 198   bool res = false;
 199   if (mark_or_rebuild_in_progress) {
 200     res |= G1EvacuationFailureALotDuringConcMark;
 201   }
 202   if (during_initial_mark) {
 203     res |= G1EvacuationFailureALotDuringInitialMark;
 204   }




 146 inline bool G1CollectedHeap::is_marked_next(oop obj) const {
 147   return _cm->next_mark_bitmap()->is_marked((HeapWord*)obj);
 148 }
 149 
 150 inline bool G1CollectedHeap::is_in_cset(oop obj) {
 151   return is_in_cset((HeapWord*)obj);
 152 }
 153 
 154 inline bool G1CollectedHeap::is_in_cset(HeapWord* addr) {
 155   return _region_attr.is_in_cset(addr);
 156 }
 157 
 158 bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) {
 159   return _region_attr.is_in_cset(hr);
 160 }
 161 
 162 bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {
 163   return _region_attr.is_in_cset_or_humongous((HeapWord*)obj);
 164 }
 165 
 166 G1HeapRegionAttr G1CollectedHeap::region_attr(const void* addr) {
 167   return _region_attr.at((HeapWord*)addr);
 168 }
 169 




 170 void G1CollectedHeap::register_humongous_region_with_region_attr(uint index) {
 171   _region_attr.set_humongous(index, region_at(index)->rem_set()->is_tracked());
 172 }
 173 
 174 void G1CollectedHeap::register_region_with_region_attr(HeapRegion* r) {
 175   _region_attr.set_has_remset(r->hrm_index(), r->rem_set()->is_tracked());
 176 }
 177 
 178 void G1CollectedHeap::register_old_region_with_region_attr(HeapRegion* r) {
 179   _region_attr.set_in_old(r->hrm_index(), r->rem_set()->is_tracked());
 180   _rem_set->prepare_for_scan_rem_set(r->hrm_index());
 181 }
 182 
 183 void G1CollectedHeap::register_optional_region_with_region_attr(HeapRegion* r) {
 184   _region_attr.set_optional(r->hrm_index(), r->rem_set()->is_tracked());
 185 }
 186 
 187 #ifndef PRODUCT
 188 // Support for G1EvacuationFailureALot
 189 
 190 inline bool
 191 G1CollectedHeap::evacuation_failure_alot_for_gc_type(bool for_young_gc,
 192                                                      bool during_initial_mark,
 193                                                      bool mark_or_rebuild_in_progress) {
 194   bool res = false;
 195   if (mark_or_rebuild_in_progress) {
 196     res |= G1EvacuationFailureALotDuringConcMark;
 197   }
 198   if (during_initial_mark) {
 199     res |= G1EvacuationFailureALotDuringInitialMark;
 200   }


< prev index next >