equal
deleted
inserted
replaced
36 #include "gc/g1/g1ParScanThreadState.inline.hpp" |
36 #include "gc/g1/g1ParScanThreadState.inline.hpp" |
37 #include "gc/g1/g1Policy.hpp" |
37 #include "gc/g1/g1Policy.hpp" |
38 #include "gc/g1/g1RootClosures.hpp" |
38 #include "gc/g1/g1RootClosures.hpp" |
39 #include "gc/g1/g1RootProcessor.hpp" |
39 #include "gc/g1/g1RootProcessor.hpp" |
40 #include "gc/g1/heapRegion.inline.hpp" |
40 #include "gc/g1/heapRegion.inline.hpp" |
|
41 #include "gc/shared/oopStorageParState.hpp" |
41 #include "gc/shared/referenceProcessor.hpp" |
42 #include "gc/shared/referenceProcessor.hpp" |
42 #include "gc/shared/weakProcessor.hpp" |
43 #include "gc/shared/weakProcessor.hpp" |
43 #include "memory/allocation.inline.hpp" |
44 #include "memory/allocation.inline.hpp" |
44 #include "runtime/mutex.hpp" |
45 #include "runtime/mutex.hpp" |
45 #include "services/management.hpp" |
46 #include "services/management.hpp" |
70 G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h, uint n_workers) : |
71 G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h, uint n_workers) : |
71 _g1h(g1h), |
72 _g1h(g1h), |
72 _process_strong_tasks(G1RP_PS_NumElements), |
73 _process_strong_tasks(G1RP_PS_NumElements), |
73 _srs(n_workers), |
74 _srs(n_workers), |
74 _lock(Mutex::leaf, "G1 Root Scanning barrier lock", false, Monitor::_safepoint_check_never), |
75 _lock(Mutex::leaf, "G1 Root Scanning barrier lock", false, Monitor::_safepoint_check_never), |
|
76 _par_state_string(StringTable::weak_storage()), |
75 _n_workers_discovered_strong_classes(0) {} |
77 _n_workers_discovered_strong_classes(0) {} |
76 |
78 |
77 void G1RootProcessor::evacuate_roots(G1ParScanThreadState* pss, uint worker_i) { |
79 void G1RootProcessor::evacuate_roots(G1ParScanThreadState* pss, uint worker_i) { |
78 G1GCPhaseTimes* phase_times = _g1h->g1_policy()->phase_times(); |
80 G1GCPhaseTimes* phase_times = _g1h->g1_policy()->phase_times(); |
79 |
81 |
299 uint worker_i) { |
301 uint worker_i) { |
300 assert(closures->weak_oops() != NULL, "Should only be called when all roots are processed"); |
302 assert(closures->weak_oops() != NULL, "Should only be called when all roots are processed"); |
301 G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::StringTableRoots, worker_i); |
303 G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::StringTableRoots, worker_i); |
302 // All threads execute the following. A specific chunk of buckets |
304 // All threads execute the following. A specific chunk of buckets |
303 // from the StringTable are the individual tasks. |
305 // from the StringTable are the individual tasks. |
304 StringTable::possibly_parallel_oops_do(closures->weak_oops()); |
306 StringTable::possibly_parallel_oops_do(&_par_state_string, closures->weak_oops()); |
305 } |
307 } |
306 |
308 |
307 void G1RootProcessor::process_code_cache_roots(CodeBlobClosure* code_closure, |
309 void G1RootProcessor::process_code_cache_roots(CodeBlobClosure* code_closure, |
308 G1GCPhaseTimes* phase_times, |
310 G1GCPhaseTimes* phase_times, |
309 uint worker_i) { |
311 uint worker_i) { |