< prev index next >
src/share/vm/gc/g1/g1OopClosures.cpp
Print this page
*** 32,64 ****
G1ParCopyHelper::G1ParCopyHelper(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
_g1(g1),
_par_scan_state(par_scan_state),
_worker_id(par_scan_state->worker_id()),
- _scanned_klass(NULL),
_cm(_g1->concurrent_mark())
{ }
G1ScanClosureBase::G1ScanClosureBase(G1CollectedHeap* g1, G1ParScanThreadState* par_scan_state) :
_g1(g1), _par_scan_state(par_scan_state), _from(NULL)
{ }
- void G1KlassScanClosure::do_klass(Klass* klass) {
- // If the klass has not been dirtied we know that there's
- // no references into the young gen and we can skip it.
- if (!_process_only_dirty || klass->has_modified_oops()) {
- // Clean the klass since we're going to scavenge all the metadata.
- klass->clear_modified_oops();
-
- // Tell the closure that this klass is the Klass to scavenge
- // and is the one to dirty if oops are left pointing into the young gen.
- _closure->set_scanned_klass(klass);
-
- klass->oops_do(_closure);
-
- _closure->set_scanned_klass(NULL);
- }
- _count++;
- }
// Generate G1 specialized oop_oop_iterate functions.
SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_G1(ALL_KLASS_OOP_OOP_ITERATE_DEFN)
--- 32,46 ----
< prev index next >