27 #include "gc_implementation/g1/concurrentG1Refine.hpp" |
27 #include "gc_implementation/g1/concurrentG1Refine.hpp" |
28 #include "gc_implementation/g1/concurrentG1RefineThread.hpp" |
28 #include "gc_implementation/g1/concurrentG1RefineThread.hpp" |
29 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" |
29 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" |
30 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" |
30 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" |
31 #include "gc_implementation/g1/g1CollectorPolicy.hpp" |
31 #include "gc_implementation/g1/g1CollectorPolicy.hpp" |
|
32 #include "gc_implementation/g1/g1GCPhaseTimes.hpp" |
32 #include "gc_implementation/g1/g1OopClosures.inline.hpp" |
33 #include "gc_implementation/g1/g1OopClosures.inline.hpp" |
33 #include "gc_implementation/g1/g1RemSet.inline.hpp" |
34 #include "gc_implementation/g1/g1RemSet.inline.hpp" |
34 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" |
35 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" |
35 #include "memory/iterator.hpp" |
36 #include "memory/iterator.hpp" |
36 #include "oops/oop.inline.hpp" |
37 #include "oops/oop.inline.hpp" |
222 double scan_rs_time_sec = os::elapsedTime() - rs_time_start; |
223 double scan_rs_time_sec = os::elapsedTime() - rs_time_start; |
223 |
224 |
224 assert( _cards_scanned != NULL, "invariant" ); |
225 assert( _cards_scanned != NULL, "invariant" ); |
225 _cards_scanned[worker_i] = scanRScl.cards_done(); |
226 _cards_scanned[worker_i] = scanRScl.cards_done(); |
226 |
227 |
227 _g1p->record_scan_rs_time(worker_i, scan_rs_time_sec * 1000.0); |
228 _g1p->phase_times()->record_scan_rs_time(worker_i, scan_rs_time_sec * 1000.0); |
228 } |
229 } |
229 |
230 |
230 // Closure used for updating RSets and recording references that |
231 // Closure used for updating RSets and recording references that |
231 // point into the collection set. Only called during an |
232 // point into the collection set. Only called during an |
232 // evacuation pause. |
233 // evacuation pause. |
274 // XXX This isn't true any more: keeping cards of young regions |
275 // XXX This isn't true any more: keeping cards of young regions |
275 // marked dirty broke it. Need some reasonable fix. |
276 // marked dirty broke it. Need some reasonable fix. |
276 guarantee(cl.n() == 0, "Card table should be clean."); |
277 guarantee(cl.n() == 0, "Card table should be clean."); |
277 } |
278 } |
278 |
279 |
279 _g1p->record_update_rs_time(worker_i, (os::elapsedTime() - start) * 1000.0); |
280 _g1p->phase_times()->record_update_rs_time(worker_i, (os::elapsedTime() - start) * 1000.0); |
280 } |
281 } |
281 |
282 |
282 class CountRSSizeClosure: public HeapRegionClosure { |
283 class CountRSSizeClosure: public HeapRegionClosure { |
283 size_t _n; |
284 size_t _n; |
284 size_t _tot; |
285 size_t _tot; |
388 // conditions, we'll revert back to parallel remembered set |
389 // conditions, we'll revert back to parallel remembered set |
389 // updating and scanning. See CRs 6677707 and 6677708. |
390 // updating and scanning. See CRs 6677707 and 6677708. |
390 if (G1UseParallelRSetUpdating || (worker_i == 0)) { |
391 if (G1UseParallelRSetUpdating || (worker_i == 0)) { |
391 updateRS(&into_cset_dcq, worker_i); |
392 updateRS(&into_cset_dcq, worker_i); |
392 } else { |
393 } else { |
393 _g1p->record_update_rs_processed_buffers(worker_i, 0.0); |
394 _g1p->phase_times()->record_update_rs_processed_buffers(worker_i, 0.0); |
394 _g1p->record_update_rs_time(worker_i, 0.0); |
395 _g1p->phase_times()->record_update_rs_time(worker_i, 0.0); |
395 } |
396 } |
396 if (G1UseParallelRSetScanning || (worker_i == 0)) { |
397 if (G1UseParallelRSetScanning || (worker_i == 0)) { |
397 scanRS(oc, worker_i); |
398 scanRS(oc, worker_i); |
398 } else { |
399 } else { |
399 _g1p->record_scan_rs_time(worker_i, 0.0); |
400 _g1p->phase_times()->record_scan_rs_time(worker_i, 0.0); |
400 } |
401 } |
401 |
402 |
402 // We now clear the cached values of _cset_rs_update_cl for this worker |
403 // We now clear the cached values of _cset_rs_update_cl for this worker |
403 _cset_rs_update_cl[worker_i] = NULL; |
404 _cset_rs_update_cl[worker_i] = NULL; |
404 } |
405 } |