< prev index next >

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

Print this page
*** 26,10 ***
--- 26,11 ---
  #define SHARE_GC_G1_G1COLLECTEDHEAP_INLINE_HPP
  
  #include "gc/g1/g1CollectedHeap.hpp"
  
  #include "gc/g1/g1BarrierSet.hpp"
+ #include "gc/g1/g1CardSetContainers.hpp"
  #include "gc/g1/g1CollectorState.hpp"
  #include "gc/g1/g1EvacFailureRegions.hpp"
  #include "gc/g1/g1Policy.hpp"
  #include "gc/g1/g1RemSet.hpp"
  #include "gc/g1/heapRegion.inline.hpp"

*** 199,11 ***
  
  void G1CollectedHeap::register_optional_region_with_region_attr(HeapRegion* r) {
    _region_attr.set_optional(r->hrm_index(), r->rem_set()->is_tracked());
  }
  
! inline bool G1CollectedHeap::is_in_young(const oop obj) {
    if (obj == NULL) {
      return false;
    }
    return heap_region_containing(obj)->is_young();
  }
--- 200,12 ---
  
  void G1CollectedHeap::register_optional_region_with_region_attr(HeapRegion* r) {
    _region_attr.set_optional(r->hrm_index(), r->rem_set()->is_tracked());
  }
  
! 
+ inline bool G1CollectedHeap::is_in_young(const oop obj) const {
    if (obj == NULL) {
      return false;
    }
    return heap_region_containing(obj)->is_young();
  }

*** 267,6 ***
--- 269,11 ---
      set_humongous_reclaim_candidate(region, false);
      _region_attr.clear_humongous(region);
    }
  }
  
+ inline bool G1CollectedHeap::requires_barriers(oop obj) const {
+   assert (obj != NULL, "");
+   return !heap_region_containing(obj)->is_young(); // is_in_young does an unnecessary NULL check
+ }
+ 
  #endif // SHARE_GC_G1_G1COLLECTEDHEAP_INLINE_HPP
< prev index next >