8295158: G1: Increase card-based cost sample reporting threshold

Reviewed-by: iwalulya, ayang
This commit is contained in:
Thomas Schatzl 2022-10-14 14:12:26 +00:00
parent 312985eea6
commit 449b52fd23
3 changed files with 8 additions and 7 deletions

@ -325,7 +325,7 @@ size_t G1Analytics::predict_rs_length(bool for_young_only_phase) const {
}
size_t G1Analytics::predict_pending_cards(bool for_young_only_phase) const {
if (for_young_only_phase || !enough_samples_available(_mixed_pending_cards_seq)) {
if (for_young_only_phase || !enough_samples_available(_mixed_pending_cards_seq)) {
return predict_size(_young_pending_cards_seq);
} else {
return predict_size(_mixed_pending_cards_seq);

@ -809,11 +809,7 @@ void G1Policy::record_young_collection_end(bool concurrent_operation_is_full_mar
p->sum_thread_work_items(G1GCPhaseTimes::OptMergeRS, G1GCPhaseTimes::MergeRSDirtyCards) +
total_log_buffer_cards;
// The threshold for the number of cards in a given sampling which we consider
// large enough so that the impact from setup and other costs is negligible.
size_t const CardsNumSamplingThreshold = 10;
if (total_cards_merged > CardsNumSamplingThreshold) {
if (total_cards_merged >= G1NumCardsCostSampleThreshold) {
double avg_time_merge_cards = average_time_ms(G1GCPhaseTimes::MergeER) +
average_time_ms(G1GCPhaseTimes::MergeRS) +
average_time_ms(G1GCPhaseTimes::MergeHCC) +
@ -826,7 +822,7 @@ void G1Policy::record_young_collection_end(bool concurrent_operation_is_full_mar
size_t const total_cards_scanned = p->sum_thread_work_items(G1GCPhaseTimes::ScanHR, G1GCPhaseTimes::ScanHRScannedCards) +
p->sum_thread_work_items(G1GCPhaseTimes::OptScanHR, G1GCPhaseTimes::ScanHRScannedCards);
if (total_cards_scanned > CardsNumSamplingThreshold) {
if (total_cards_scanned >= G1NumCardsCostSampleThreshold) {
double avg_time_dirty_card_scan = average_time_ms(G1GCPhaseTimes::ScanHR) +
average_time_ms(G1GCPhaseTimes::OptScanHR);

@ -377,6 +377,11 @@
"retained region restore purposes.") \
range(1, 256) \
\
product(uint, G1NumCardsCostSampleThreshold, 1000, DIAGNOSTIC, \
"Threshold for the number of cards when reporting card cost " \
"related prediction sample. That sample must involve the same or "\
"more than that number of cards to be used.") \
\
GC_G1_EVACUATION_FAILURE_FLAGS(develop, \
develop_pd, \
product, \