65 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
66 if (_g1->in_cset_fast_test(obj)) {
67 // We're not going to even bother checking whether the object is
68 // already forwarded or not, as this usually causes an immediate
69 // stall. We'll try to prefetch the object (for write, given that
70 // we might need to install the forwarding reference) and we'll
71 // get back to it when pop it from the queue
72 Prefetch::write(obj->mark_addr(), 0);
73 Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
74
75 // slightly paranoid test; I'm trying to catch potential
76 // problems before we go into push_on_queue to know where the
77 // problem is coming from
78 assert((obj == oopDesc::load_decode_heap_oop(p)) ||
79 (obj->is_forwarded() &&
80 obj->forwardee() == oopDesc::load_decode_heap_oop(p)),
81 "p should still be pointing to obj or to its forwardee");
82
83 _par_scan_state->push_on_queue(p);
84 } else {
85 _par_scan_state->update_rs(_from, p, _par_scan_state->queue_num());
86 }
87 }
88 }
89
90 template <class T>
91 inline void G1ParPushHeapRSClosure::do_oop_nv(T* p) {
92 T heap_oop = oopDesc::load_heap_oop(p);
93
94 if (!oopDesc::is_null(heap_oop)) {
95 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
96 if (_g1->in_cset_fast_test(obj)) {
97 Prefetch::write(obj->mark_addr(), 0);
98 Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
99
100 // Place on the references queue
101 _par_scan_state->push_on_queue(p);
102 }
103 }
104 }
105
|
65 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
66 if (_g1->in_cset_fast_test(obj)) {
67 // We're not going to even bother checking whether the object is
68 // already forwarded or not, as this usually causes an immediate
69 // stall. We'll try to prefetch the object (for write, given that
70 // we might need to install the forwarding reference) and we'll
71 // get back to it when pop it from the queue
72 Prefetch::write(obj->mark_addr(), 0);
73 Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
74
75 // slightly paranoid test; I'm trying to catch potential
76 // problems before we go into push_on_queue to know where the
77 // problem is coming from
78 assert((obj == oopDesc::load_decode_heap_oop(p)) ||
79 (obj->is_forwarded() &&
80 obj->forwardee() == oopDesc::load_decode_heap_oop(p)),
81 "p should still be pointing to obj or to its forwardee");
82
83 _par_scan_state->push_on_queue(p);
84 } else {
85 _par_scan_state->update_rs(_from, p, _worker_id);
86 }
87 }
88 }
89
90 template <class T>
91 inline void G1ParPushHeapRSClosure::do_oop_nv(T* p) {
92 T heap_oop = oopDesc::load_heap_oop(p);
93
94 if (!oopDesc::is_null(heap_oop)) {
95 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
96 if (_g1->in_cset_fast_test(obj)) {
97 Prefetch::write(obj->mark_addr(), 0);
98 Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
99
100 // Place on the references queue
101 _par_scan_state->push_on_queue(p);
102 }
103 }
104 }
105
|