97 if (_g1->in_cset_fast_test(obj)) {
98 Prefetch::write(obj->mark_addr(), 0);
99 Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
100
101 // Place on the references queue
102 _par_scan_state->push_on_queue(p);
103 }
104 }
105 }
106
107 template <class T>
108 inline void G1CMOopClosure::do_oop_nv(T* p) {
109 assert(_g1h->is_in_g1_reserved((HeapWord*) p), "invariant");
110 assert(!_g1h->is_on_master_free_list(
111 _g1h->heap_region_containing((HeapWord*) p)), "invariant");
112
113 oop obj = oopDesc::load_decode_heap_oop(p);
114 if (_cm->verbose_high()) {
115 gclog_or_tty->print_cr("[%u] we're looking at location "
116 "*"PTR_FORMAT" = "PTR_FORMAT,
117 _task->worker_id(), p, (void*) obj);
118 }
119 _task->deal_with_reference(obj);
120 }
121
122 template <class T>
123 inline void G1RootRegionScanClosure::do_oop_nv(T* p) {
124 T heap_oop = oopDesc::load_heap_oop(p);
125 if (!oopDesc::is_null(heap_oop)) {
126 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
127 HeapRegion* hr = _g1h->heap_region_containing((HeapWord*) obj);
128 _cm->grayRoot(obj, obj->size(), _worker_id, hr);
129 }
130 }
131
132 template <class T>
133 inline void G1Mux2Closure::do_oop_nv(T* p) {
134 // Apply first closure; then apply the second.
135 _c1->do_oop(p);
136 _c2->do_oop(p);
137 }
|
97 if (_g1->in_cset_fast_test(obj)) {
98 Prefetch::write(obj->mark_addr(), 0);
99 Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
100
101 // Place on the references queue
102 _par_scan_state->push_on_queue(p);
103 }
104 }
105 }
106
107 template <class T>
108 inline void G1CMOopClosure::do_oop_nv(T* p) {
109 assert(_g1h->is_in_g1_reserved((HeapWord*) p), "invariant");
110 assert(!_g1h->is_on_master_free_list(
111 _g1h->heap_region_containing((HeapWord*) p)), "invariant");
112
113 oop obj = oopDesc::load_decode_heap_oop(p);
114 if (_cm->verbose_high()) {
115 gclog_or_tty->print_cr("[%u] we're looking at location "
116 "*"PTR_FORMAT" = "PTR_FORMAT,
117 _task->worker_id(), p2i(p), p2i((void*) obj));
118 }
119 _task->deal_with_reference(obj);
120 }
121
122 template <class T>
123 inline void G1RootRegionScanClosure::do_oop_nv(T* p) {
124 T heap_oop = oopDesc::load_heap_oop(p);
125 if (!oopDesc::is_null(heap_oop)) {
126 oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
127 HeapRegion* hr = _g1h->heap_region_containing((HeapWord*) obj);
128 _cm->grayRoot(obj, obj->size(), _worker_id, hr);
129 }
130 }
131
132 template <class T>
133 inline void G1Mux2Closure::do_oop_nv(T* p) {
134 // Apply first closure; then apply the second.
135 _c1->do_oop(p);
136 _c2->do_oop(p);
137 }
|