< prev index next >

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

Print this page
rev 7993 : [mq]: fix


 337 inline bool G1CollectedHeap::can_elide_initializing_store_barrier(oop new_obj) {
 338   return is_in_young(new_obj);
 339 }
 340 
 341 inline bool G1CollectedHeap::is_obj_dead(const oop obj) const {
 342   if (obj == NULL) {
 343     return false;
 344   }
 345   return is_obj_dead(obj, heap_region_containing(obj));
 346 }
 347 
 348 inline bool G1CollectedHeap::is_obj_ill(const oop obj) const {
 349   if (obj == NULL) {
 350     return false;
 351   }
 352   return is_obj_ill(obj, heap_region_containing(obj));
 353 }
 354 
 355 inline void G1CollectedHeap::set_humongous_is_live(oop obj) {
 356   uint region = addr_to_region((HeapWord*)obj);
 357   // We not only set the "live" flag in the humongous_is_live table, but also
 358   // reset the entry in the _in_cset_fast_test table so that subsequent references
 359   // to the same humongous object do not go into the slow path again.
 360   // This is racy, as multiple threads may at the same time enter here, but this
 361   // is benign.
 362   // During collection we only ever set the "live" flag, and only ever clear the
 363   // entry in the in_cset_fast_table.
 364   // We only ever evaluate the contents of these tables (in the VM thread) after
 365   // having synchronized the worker threads with the VM thread, or in the same
 366   // thread (i.e. within the VM thread).
 367   if (!_humongous_is_live.is_live(region)) {
 368     _humongous_is_live.set_live(region);
 369     _in_cset_fast_test.clear_humongous(region);
 370   }
 371 }
 372 
 373 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_INLINE_HPP


 337 inline bool G1CollectedHeap::can_elide_initializing_store_barrier(oop new_obj) {
 338   return is_in_young(new_obj);
 339 }
 340 
 341 inline bool G1CollectedHeap::is_obj_dead(const oop obj) const {
 342   if (obj == NULL) {
 343     return false;
 344   }
 345   return is_obj_dead(obj, heap_region_containing(obj));
 346 }
 347 
 348 inline bool G1CollectedHeap::is_obj_ill(const oop obj) const {
 349   if (obj == NULL) {
 350     return false;
 351   }
 352   return is_obj_ill(obj, heap_region_containing(obj));
 353 }
 354 
 355 inline void G1CollectedHeap::set_humongous_is_live(oop obj) {
 356   uint region = addr_to_region((HeapWord*)obj);
 357   // Clear the flag in the humongous_reclaim_candidates table.  Also
 358   // reset the entry in the _in_cset_fast_test table so that subsequent references
 359   // to the same humongous object do not go into the slow path again.
 360   // This is racy, as multiple threads may at the same time enter here, but this
 361   // is benign.
 362   // During collection we only ever clear the "candidate" flag, and only ever clear the
 363   // entry in the in_cset_fast_table.
 364   // We only ever evaluate the contents of these tables (in the VM thread) after
 365   // having synchronized the worker threads with the VM thread, or in the same
 366   // thread (i.e. within the VM thread).
 367   if (is_humongous_reclaim_candidate(region)) {
 368     remove_humongous_reclaim_candidate(region);
 369     _in_cset_fast_test.clear_humongous(region);
 370   }
 371 }
 372 
 373 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_INLINE_HPP
< prev index next >