110 {
111 _boundary = _g->reserved().end();
112 }
113
114 void ScanClosure::do_oop(oop* p) { ScanClosure::do_oop_work(p); }
115 void ScanClosure::do_oop(narrowOop* p) { ScanClosure::do_oop_work(p); }
116
117 FastScanClosure::FastScanClosure(DefNewGeneration* g, bool gc_barrier) :
118 OopsInClassLoaderDataOrGenClosure(g), _g(g), _gc_barrier(gc_barrier)
119 {
120 _boundary = _g->reserved().end();
121 }
122
123 void FastScanClosure::do_oop(oop* p) { FastScanClosure::do_oop_work(p); }
124 void FastScanClosure::do_oop(narrowOop* p) { FastScanClosure::do_oop_work(p); }
125
126 void CLDScanClosure::do_cld(ClassLoaderData* cld) {
127 NOT_PRODUCT(ResourceMark rm);
128 log_develop_trace(gc, scavenge)("CLDScanClosure::do_cld " PTR_FORMAT ", %s, dirty: %s",
129 p2i(cld),
130 cld->loader_name(),
131 cld->has_modified_oops() ? "true" : "false");
132
133 // If the cld has not been dirtied we know that there's
134 // no references into the young gen and we can skip it.
135 if (cld->has_modified_oops()) {
136 if (_accumulate_modified_oops) {
137 cld->accumulate_modified_oops();
138 }
139
140 // Tell the closure which CLD is being scanned so that it can be dirtied
141 // if oops are left pointing into the young gen.
142 _scavenge_closure->set_scanned_cld(cld);
143
144 // Clean the cld since we're going to scavenge all the metadata.
145 cld->oops_do(_scavenge_closure, false, /*clear_modified_oops*/true);
146
147 _scavenge_closure->set_scanned_cld(NULL);
148 }
149 }
150
|
110 {
111 _boundary = _g->reserved().end();
112 }
113
114 void ScanClosure::do_oop(oop* p) { ScanClosure::do_oop_work(p); }
115 void ScanClosure::do_oop(narrowOop* p) { ScanClosure::do_oop_work(p); }
116
117 FastScanClosure::FastScanClosure(DefNewGeneration* g, bool gc_barrier) :
118 OopsInClassLoaderDataOrGenClosure(g), _g(g), _gc_barrier(gc_barrier)
119 {
120 _boundary = _g->reserved().end();
121 }
122
123 void FastScanClosure::do_oop(oop* p) { FastScanClosure::do_oop_work(p); }
124 void FastScanClosure::do_oop(narrowOop* p) { FastScanClosure::do_oop_work(p); }
125
126 void CLDScanClosure::do_cld(ClassLoaderData* cld) {
127 NOT_PRODUCT(ResourceMark rm);
128 log_develop_trace(gc, scavenge)("CLDScanClosure::do_cld " PTR_FORMAT ", %s, dirty: %s",
129 p2i(cld),
130 cld->loader_name_and_id(),
131 cld->has_modified_oops() ? "true" : "false");
132
133 // If the cld has not been dirtied we know that there's
134 // no references into the young gen and we can skip it.
135 if (cld->has_modified_oops()) {
136 if (_accumulate_modified_oops) {
137 cld->accumulate_modified_oops();
138 }
139
140 // Tell the closure which CLD is being scanned so that it can be dirtied
141 // if oops are left pointing into the young gen.
142 _scavenge_closure->set_scanned_cld(cld);
143
144 // Clean the cld since we're going to scavenge all the metadata.
145 cld->oops_do(_scavenge_closure, false, /*clear_modified_oops*/true);
146
147 _scavenge_closure->set_scanned_cld(NULL);
148 }
149 }
150
|