< prev index next >

src/share/vm/gc/g1/g1OopClosures.inline.hpp

Print this page




  90 inline void G1CMOopClosure::do_oop_nv(T* p) {
  91   oop obj = oopDesc::load_decode_heap_oop(p);
  92   _task->deal_with_reference(obj);
  93 }
  94 
  95 template <class T>
  96 inline void G1RootRegionScanClosure::do_oop_nv(T* p) {
  97   T heap_oop = oopDesc::load_heap_oop(p);
  98   if (oopDesc::is_null(heap_oop)) {
  99     return;
 100   }
 101   oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
 102   _cm->mark_in_next_bitmap(obj);
 103 }
 104 
 105 template <class T>
 106 inline static void check_obj_during_refinement(T* p, oop const obj) {
 107 #ifdef ASSERT
 108   G1CollectedHeap* g1 = G1CollectedHeap::heap();
 109   // can't do because of races
 110   // assert(obj == NULL || obj->is_oop(), "expected an oop");
 111   assert(check_obj_alignment(obj), "not oop aligned");
 112   assert(g1->is_in_reserved(obj), "must be in heap");
 113 
 114   HeapRegion* from = g1->heap_region_containing(p);
 115 
 116   assert(from != NULL, "from region must be non-NULL");
 117   assert(from->is_in_reserved(p) ||
 118          (from->is_humongous() &&
 119           g1->heap_region_containing(p)->is_humongous() &&
 120           from->humongous_start_region() == g1->heap_region_containing(p)->humongous_start_region()),
 121          "p " PTR_FORMAT " is not in the same region %u or part of the correct humongous object starting at region %u.",
 122          p2i(p), from->hrm_index(), from->humongous_start_region()->hrm_index());
 123 #endif // ASSERT
 124 }
 125 
 126 template <class T>
 127 inline void G1ConcurrentRefineOopClosure::do_oop_nv(T* p) {
 128   T o = oopDesc::load_heap_oop(p);
 129   if (oopDesc::is_null(o)) {
 130     return;




  90 inline void G1CMOopClosure::do_oop_nv(T* p) {
  91   oop obj = oopDesc::load_decode_heap_oop(p);
  92   _task->deal_with_reference(obj);
  93 }
  94 
  95 template <class T>
  96 inline void G1RootRegionScanClosure::do_oop_nv(T* p) {
  97   T heap_oop = oopDesc::load_heap_oop(p);
  98   if (oopDesc::is_null(heap_oop)) {
  99     return;
 100   }
 101   oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
 102   _cm->mark_in_next_bitmap(obj);
 103 }
 104 
 105 template <class T>
 106 inline static void check_obj_during_refinement(T* p, oop const obj) {
 107 #ifdef ASSERT
 108   G1CollectedHeap* g1 = G1CollectedHeap::heap();
 109   // can't do because of races
 110   // assert(obj == NULL || oopDesc::is_oop(obj), "expected an oop");
 111   assert(check_obj_alignment(obj), "not oop aligned");
 112   assert(g1->is_in_reserved(obj), "must be in heap");
 113 
 114   HeapRegion* from = g1->heap_region_containing(p);
 115 
 116   assert(from != NULL, "from region must be non-NULL");
 117   assert(from->is_in_reserved(p) ||
 118          (from->is_humongous() &&
 119           g1->heap_region_containing(p)->is_humongous() &&
 120           from->humongous_start_region() == g1->heap_region_containing(p)->humongous_start_region()),
 121          "p " PTR_FORMAT " is not in the same region %u or part of the correct humongous object starting at region %u.",
 122          p2i(p), from->hrm_index(), from->humongous_start_region()->hrm_index());
 123 #endif // ASSERT
 124 }
 125 
 126 template <class T>
 127 inline void G1ConcurrentRefineOopClosure::do_oop_nv(T* p) {
 128   T o = oopDesc::load_heap_oop(p);
 129   if (oopDesc::is_null(o)) {
 130     return;


< prev index next >