< prev index next >
src/hotspot/share/gc/g1/g1RemSet.cpp
Print this page
rev 49670 : imported patch 8178105-switch-at-remark
rev 49673 : imported patch 8178105-8200371-assert-problem
rev 49677 : imported patch 8200426-g1h-refactoring
rev 49678 : imported patch 8200426-sangheon-review
rev 49680 : imported patch 6672778-partial-queue-trimming
rev 49681 : imported patch 6672778-refactoring
rev 49682 : [mq]: 6672778-stefanj-review
*** 391,403 ****
scan_card(mr, region_idx_for_card);
}
}
void G1ScanRSForRegionClosure::scan_strong_code_roots(HeapRegion* r) {
- Ticks const scan_start = Ticks::now();
r->strong_code_roots_do(_pss->closures()->weak_codeblobs());
- _strong_code_root_scan_time += (Ticks::now() - scan_start);
}
bool G1ScanRSForRegionClosure::do_heap_region(HeapRegion* r) {
assert(r->in_collection_set(),
"Should only be called on elements of the collection set but region %u is not.",
--- 391,401 ----
*** 408,431 ****
if (_scan_state->iter_is_complete(region_idx)) {
return false;
}
{
! Ticks const start = Ticks::now();
scan_rem_set_roots(r);
- Tickspan const trim_partially_time = _pss->trim_ticks_and_reset();
- _rem_set_root_scan_time += (Ticks::now() - start) - trim_partially_time;
- _rem_set_trim_partially_time += trim_partially_time;
}
if (_scan_state->set_iter_complete(region_idx)) {
! Ticks const start = Ticks::now();
// Scan the strong code root list attached to the current region
scan_strong_code_roots(r);
- Tickspan const trim_partially_time = _pss->trim_ticks_and_reset();
- _strong_code_root_scan_time += (Ticks::now() - start) - trim_partially_time;
- _strong_code_trim_partially_time += trim_partially_time;
}
return false;
}
void G1RemSet::scan_rem_set(G1ParScanThreadState* pss, uint worker_i) {
--- 406,423 ----
if (_scan_state->iter_is_complete(region_idx)) {
return false;
}
{
! G1EvacPhaseWithTrimTimeTracker timer(_pss, _rem_set_root_scan_time, _rem_set_trim_partially_time);
scan_rem_set_roots(r);
}
if (_scan_state->set_iter_complete(region_idx)) {
! G1EvacPhaseWithTrimTimeTracker timer(_pss, _strong_code_root_scan_time, _strong_code_trim_partially_time);
// Scan the strong code root list attached to the current region
scan_strong_code_roots(r);
}
return false;
}
void G1RemSet::scan_rem_set(G1ParScanThreadState* pss, uint worker_i) {
*** 483,517 ****
void G1RemSet::update_rem_set(G1ParScanThreadState* pss, uint worker_i) {
G1GCPhaseTimes* p = _g1p->phase_times();
// Apply closure to log entries in the HCC.
if (G1HotCardCache::default_use_cache()) {
! {
! G1GCParPhaseTimesTracker x(p, G1GCPhaseTimes::ScanHCC, worker_i);
G1ScanObjsDuringUpdateRSClosure scan_hcc_cl(_g1h, pss, worker_i);
G1RefineCardClosure refine_card_cl(_g1h, &scan_hcc_cl);
-
_g1h->iterate_hcc_closure(&refine_card_cl, worker_i);
}
- double const scan_hcc_trim_queue_time = TicksToTimeHelper::seconds(pss->trim_ticks_and_reset());
- p->move_time_secs(G1GCPhaseTimes::ScanHCC, G1GCPhaseTimes::ObjCopy, worker_i, scan_hcc_trim_queue_time);
- }
// Now apply the closure to all remaining log entries.
G1ScanObjsDuringUpdateRSClosure update_rs_cl(_g1h, pss, worker_i);
G1RefineCardClosure refine_card_cl(_g1h, &update_rs_cl);
- {
- G1GCParPhaseTimesTracker x(p, G1GCPhaseTimes::UpdateRS, worker_i);
_g1h->iterate_dirty_card_closure(&refine_card_cl, worker_i);
- }
-
- double const update_rs_trim_queue_time = TicksToTimeHelper::seconds(pss->trim_ticks_and_reset());
- p->move_time_secs(G1GCPhaseTimes::UpdateRS, G1GCPhaseTimes::ObjCopy, worker_i, update_rs_trim_queue_time);
p->record_thread_work_item(G1GCPhaseTimes::UpdateRS, worker_i, refine_card_cl.cards_scanned(), G1GCPhaseTimes::UpdateRSScannedCards);
p->record_thread_work_item(G1GCPhaseTimes::UpdateRS, worker_i, refine_card_cl.cards_skipped(), G1GCPhaseTimes::UpdateRSSkippedCards);
}
void G1RemSet::cleanupHRRS() {
HeapRegionRemSet::cleanup();
}
--- 475,502 ----
void G1RemSet::update_rem_set(G1ParScanThreadState* pss, uint worker_i) {
G1GCPhaseTimes* p = _g1p->phase_times();
// Apply closure to log entries in the HCC.
if (G1HotCardCache::default_use_cache()) {
! G1EvacPhaseTimesTracker x(p, pss, G1GCPhaseTimes::ScanHCC, worker_i);
G1ScanObjsDuringUpdateRSClosure scan_hcc_cl(_g1h, pss, worker_i);
G1RefineCardClosure refine_card_cl(_g1h, &scan_hcc_cl);
_g1h->iterate_hcc_closure(&refine_card_cl, worker_i);
}
// Now apply the closure to all remaining log entries.
+ {
+ G1EvacPhaseTimesTracker x(p, pss, G1GCPhaseTimes::UpdateRS, worker_i);
+
G1ScanObjsDuringUpdateRSClosure update_rs_cl(_g1h, pss, worker_i);
G1RefineCardClosure refine_card_cl(_g1h, &update_rs_cl);
_g1h->iterate_dirty_card_closure(&refine_card_cl, worker_i);
p->record_thread_work_item(G1GCPhaseTimes::UpdateRS, worker_i, refine_card_cl.cards_scanned(), G1GCPhaseTimes::UpdateRSScannedCards);
p->record_thread_work_item(G1GCPhaseTimes::UpdateRS, worker_i, refine_card_cl.cards_skipped(), G1GCPhaseTimes::UpdateRSSkippedCards);
+ }
}
void G1RemSet::cleanupHRRS() {
HeapRegionRemSet::cleanup();
}
< prev index next >