65 inline void G1ParScanClosure::do_oop_nv(T* p) { |
65 inline void G1ParScanClosure::do_oop_nv(T* p) { |
66 T heap_oop = oopDesc::load_heap_oop(p); |
66 T heap_oop = oopDesc::load_heap_oop(p); |
67 |
67 |
68 if (!oopDesc::is_null(heap_oop)) { |
68 if (!oopDesc::is_null(heap_oop)) { |
69 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); |
69 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); |
70 G1CollectedHeap::in_cset_state_t state = _g1->in_cset_state(obj); |
70 const InCSetState state = _g1->in_cset_state(obj); |
71 if (state == G1CollectedHeap::InCSet) { |
71 if (state.is_in_cset()) { |
72 // We're not going to even bother checking whether the object is |
72 // We're not going to even bother checking whether the object is |
73 // already forwarded or not, as this usually causes an immediate |
73 // already forwarded or not, as this usually causes an immediate |
74 // stall. We'll try to prefetch the object (for write, given that |
74 // stall. We'll try to prefetch the object (for write, given that |
75 // we might need to install the forwarding reference) and we'll |
75 // we might need to install the forwarding reference) and we'll |
76 // get back to it when pop it from the queue |
76 // get back to it when pop it from the queue |
85 obj->forwardee() == oopDesc::load_decode_heap_oop(p)), |
85 obj->forwardee() == oopDesc::load_decode_heap_oop(p)), |
86 "p should still be pointing to obj or to its forwardee"); |
86 "p should still be pointing to obj or to its forwardee"); |
87 |
87 |
88 _par_scan_state->push_on_queue(p); |
88 _par_scan_state->push_on_queue(p); |
89 } else { |
89 } else { |
90 if (state == G1CollectedHeap::IsHumongous) { |
90 if (state.is_humongous()) { |
91 _g1->set_humongous_is_live(obj); |
91 _g1->set_humongous_is_live(obj); |
92 } |
92 } |
93 _par_scan_state->update_rs(_from, p, _worker_id); |
93 _par_scan_state->update_rs(_from, p, _worker_id); |
94 } |
94 } |
95 } |
95 } |