< prev index next >

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

Print this page
rev 52316 : imported patch 8212911-unify-reference-handling-during-gc
rev 52317 : imported patch 8212911-stefanj-review
rev 52318 : imported patch 8212911-kbarrett-review
rev 52319 : imported patch 8213142-use-raii-to-set-scanning-from-young


  67   }
  68 }
  69 
  70 inline void G1ScanClosureBase::trim_queue_partially() {
  71   _par_scan_state->trim_queue_partially();
  72 }
  73 
  74 template <class T>
  75 inline void G1ScanEvacuatedObjClosure::do_oop_work(T* p) {
  76   T heap_oop = RawAccess<>::oop_load(p);
  77 
  78   if (CompressedOops::is_null(heap_oop)) {
  79     return;
  80   }
  81   oop obj = CompressedOops::decode_not_null(heap_oop);
  82   const InCSetState state = _g1h->in_cset_state(obj);
  83   if (state.is_in_cset()) {
  84     prefetch_and_push(p, obj);
  85   } else if (!HeapRegion::is_in_same_region(p, obj)) {
  86     handle_non_cset_obj_common(state, p, obj);
  87     if (_scanning_in_young) {

  88       return;
  89     }
  90     _par_scan_state->enqueue_card_if_tracked(p, obj);
  91   }
  92 }
  93 
  94 template <class T>
  95 inline void G1CMOopClosure::do_oop_work(T* p) {
  96   _task->deal_with_reference(p);
  97 }
  98 
  99 template <class T>
 100 inline void G1RootRegionScanClosure::do_oop_work(T* p) {
 101   T heap_oop = RawAccess<MO_VOLATILE>::oop_load(p);
 102   if (CompressedOops::is_null(heap_oop)) {
 103     return;
 104   }
 105   oop obj = CompressedOops::decode_not_null(heap_oop);
 106   _cm->mark_in_next_bitmap(_worker_id, obj);
 107 }




  67   }
  68 }
  69 
  70 inline void G1ScanClosureBase::trim_queue_partially() {
  71   _par_scan_state->trim_queue_partially();
  72 }
  73 
  74 template <class T>
  75 inline void G1ScanEvacuatedObjClosure::do_oop_work(T* p) {
  76   T heap_oop = RawAccess<>::oop_load(p);
  77 
  78   if (CompressedOops::is_null(heap_oop)) {
  79     return;
  80   }
  81   oop obj = CompressedOops::decode_not_null(heap_oop);
  82   const InCSetState state = _g1h->in_cset_state(obj);
  83   if (state.is_in_cset()) {
  84     prefetch_and_push(p, obj);
  85   } else if (!HeapRegion::is_in_same_region(p, obj)) {
  86     handle_non_cset_obj_common(state, p, obj);
  87     assert(_scanning_in_young != Uninitialized, "Scan location has not been initialized.");
  88     if (_scanning_in_young == True) {
  89       return;
  90     }
  91     _par_scan_state->enqueue_card_if_tracked(p, obj);
  92   }
  93 }
  94 
  95 template <class T>
  96 inline void G1CMOopClosure::do_oop_work(T* p) {
  97   _task->deal_with_reference(p);
  98 }
  99 
 100 template <class T>
 101 inline void G1RootRegionScanClosure::do_oop_work(T* p) {
 102   T heap_oop = RawAccess<MO_VOLATILE>::oop_load(p);
 103   if (CompressedOops::is_null(heap_oop)) {
 104     return;
 105   }
 106   oop obj = CompressedOops::decode_not_null(heap_oop);
 107   _cm->mark_in_next_bitmap(_worker_id, obj);
 108 }


< prev index next >