< prev index next >

src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp

Print this page
rev 7696 : 8030646: track collection set membership in one place


 217 inline bool G1CollectedHeap::isMarkedPrev(oop obj) const {
 218   return _cm->prevMarkBitMap()->isMarked((HeapWord *)obj);
 219 }
 220 
 221 inline bool G1CollectedHeap::isMarkedNext(oop obj) const {
 222   return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj);
 223 }
 224 
 225 // This is a fast test on whether a reference points into the
 226 // collection set or not. Assume that the reference
 227 // points into the heap.
 228 inline bool G1CollectedHeap::is_in_cset(oop obj) {
 229   bool ret = _in_cset_fast_test.is_in_cset((HeapWord*)obj);
 230   // let's make sure the result is consistent with what the slower
 231   // test returns
 232   assert( ret || !obj_in_cs(obj), "sanity");
 233   assert(!ret ||  obj_in_cs(obj), "sanity");
 234   return ret;
 235 }
 236 




 237 bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {
 238   return _in_cset_fast_test.is_in_cset_or_humongous((HeapWord*)obj);
 239 }
 240 
 241 InCSetState G1CollectedHeap::in_cset_state(const oop obj) {
 242   return _in_cset_fast_test.at((HeapWord*)obj);
 243 }
 244 
 245 void G1CollectedHeap::register_humongous_region_with_in_cset_fast_test(uint index) {
 246   _in_cset_fast_test.set_humongous(index);
 247 }
 248 
 249 #ifndef PRODUCT
 250 // Support for G1EvacuationFailureALot
 251 
 252 inline bool
 253 G1CollectedHeap::evacuation_failure_alot_for_gc_type(bool gcs_are_young,
 254                                                      bool during_initial_mark,
 255                                                      bool during_marking) {
 256   bool res = false;




 217 inline bool G1CollectedHeap::isMarkedPrev(oop obj) const {
 218   return _cm->prevMarkBitMap()->isMarked((HeapWord *)obj);
 219 }
 220 
 221 inline bool G1CollectedHeap::isMarkedNext(oop obj) const {
 222   return _cm->nextMarkBitMap()->isMarked((HeapWord *)obj);
 223 }
 224 
 225 // This is a fast test on whether a reference points into the
 226 // collection set or not. Assume that the reference
 227 // points into the heap.
 228 inline bool G1CollectedHeap::is_in_cset(oop obj) {
 229   bool ret = _in_cset_fast_test.is_in_cset((HeapWord*)obj);
 230   // let's make sure the result is consistent with what the slower
 231   // test returns
 232   assert( ret || !obj_in_cs(obj), "sanity");
 233   assert(!ret ||  obj_in_cs(obj), "sanity");
 234   return ret;
 235 }
 236 
 237 bool G1CollectedHeap::is_in_cset(const HeapRegion* hr) {
 238   return _in_cset_fast_test.is_in_cset(hr);
 239 }
 240 
 241 bool G1CollectedHeap::is_in_cset_or_humongous(const oop obj) {
 242   return _in_cset_fast_test.is_in_cset_or_humongous((HeapWord*)obj);
 243 }
 244 
 245 InCSetState G1CollectedHeap::in_cset_state(const oop obj) {
 246   return _in_cset_fast_test.at((HeapWord*)obj);
 247 }
 248 
 249 void G1CollectedHeap::register_humongous_region_with_in_cset_fast_test(uint index) {
 250   _in_cset_fast_test.set_humongous(index);
 251 }
 252 
 253 #ifndef PRODUCT
 254 // Support for G1EvacuationFailureALot
 255 
 256 inline bool
 257 G1CollectedHeap::evacuation_failure_alot_for_gc_type(bool gcs_are_young,
 258                                                      bool during_initial_mark,
 259                                                      bool during_marking) {
 260   bool res = false;


< prev index next >