< prev index next >
src/hotspot/share/gc/g1/g1Analytics.hpp
Print this page
rev 56992 : imported patch 8227739-merge-scan-rs-update-rs-cost
rev 56993 : [mq]: 8227739-sjohanss-review
@@ -46,17 +46,25 @@
double _prev_collection_pause_end_ms;
TruncatedSeq* _rs_length_diff_seq;
TruncatedSeq* _concurrent_refine_rate_ms_seq;
TruncatedSeq* _logged_cards_rate_ms_seq;
- TruncatedSeq* _cost_per_logged_card_ms_seq;
- TruncatedSeq* _cost_scan_hcc_seq;
- TruncatedSeq* _young_cards_per_entry_ratio_seq;
- TruncatedSeq* _mixed_cards_per_entry_ratio_seq;
- TruncatedSeq* _young_only_cost_per_remset_card_ms_seq;
- TruncatedSeq* _mixed_cost_per_remset_card_ms_seq;
- TruncatedSeq* _cost_per_byte_ms_seq;
+ // The ratio between the number of merged cards and actually scanned cards, for
+ // young-only and mixed gcs.
+ TruncatedSeq* _young_card_merge_to_scan_ratio_seq;
+ TruncatedSeq* _mixed_card_merge_to_scan_ratio_seq;
+
+ // The cost to scan a card during young-only and mixed gcs in ms.
+ TruncatedSeq* _young_cost_per_card_scan_ms_seq;
+ TruncatedSeq* _mixed_cost_per_card_scan_ms_seq;
+
+ // The cost to merge a card during young-only and mixed gcs in ms.
+ TruncatedSeq* _young_cost_per_card_merge_ms_seq;
+ TruncatedSeq* _mixed_cost_per_card_merge_ms_seq;
+
+ // The cost to copy a byte in ms.
+ TruncatedSeq* _copy_cost_per_byte_ms_seq;
TruncatedSeq* _constant_other_time_ms_seq;
TruncatedSeq* _young_other_cost_per_region_ms_seq;
TruncatedSeq* _non_young_other_cost_per_region_ms_seq;
TruncatedSeq* _pending_cards_seq;
@@ -70,10 +78,14 @@
// The ratio of gc time to elapsed time, computed over recent pauses,
// and the ratio for just the last pause.
double _recent_avg_pause_time_ratio;
double _last_pause_time_ratio;
+ // Returns whether the sequence have enough samples to get a "good" prediction.
+ // The constant used is random but "small".
+ bool enough_samples_available(TruncatedSeq const* seq) const { return seq->num() >= 3; }
+
double get_new_prediction(TruncatedSeq const* seq) const;
size_t get_new_size_prediction(TruncatedSeq const* seq) const;
public:
G1Analytics(const G1Predictions* predictor);
@@ -101,14 +113,13 @@
void report_concurrent_mark_remark_times_ms(double ms);
void report_concurrent_mark_cleanup_times_ms(double ms);
void report_alloc_rate_ms(double alloc_rate);
void report_concurrent_refine_rate_ms(double cards_per_ms);
void report_logged_cards_rate_ms(double cards_per_ms);
- void report_cost_per_logged_card_ms(double cost_per_logged_card_ms);
- void report_cost_scan_hcc(double cost_scan_hcc);
- void report_cost_per_remset_card_ms(double cost_per_remset_card_ms, bool for_young_gc);
- void report_cards_per_entry_ratio(double cards_per_entry_ratio, bool for_young_gc);
+ void report_cost_per_card_scan_ms(double cost_per_remset_card_ms, bool for_young_gc);
+ void report_cost_per_card_merge_ms(double cost_per_card_ms, bool for_young_gc);
+ void report_card_merge_to_scan_ratio(double cards_per_entry_ratio, bool for_young_gc);
void report_rs_length_diff(double rs_length_diff);
void report_cost_per_byte_ms(double cost_per_byte_ms, bool mark_or_rebuild_in_progress);
void report_young_other_cost_per_region_ms(double other_cost_per_region_ms);
void report_non_young_other_cost_per_region_ms(double other_cost_per_region_ms);
void report_constant_other_time_ms(double constant_other_time_ms);
@@ -118,25 +129,18 @@
double predict_alloc_rate_ms() const;
int num_alloc_rate_ms() const;
double predict_concurrent_refine_rate_ms() const;
double predict_logged_cards_rate_ms() const;
- double predict_cost_per_logged_card_ms() const;
-
- double predict_scan_hcc_ms() const;
-
- double predict_rs_update_time_ms(size_t pending_cards) const;
+ double predict_young_card_merge_to_scan_ratio() const;
- double predict_young_cards_per_entry_ratio() const;
+ double predict_mixed_card_merge_to_scan_ratio() const;
- double predict_mixed_cards_per_entry_ratio() const;
+ size_t predict_scan_card_num(size_t rs_length, bool for_young_gc) const;
- size_t predict_card_num(size_t rs_length, bool for_young_gc) const;
-
- double predict_rs_scan_time_ms(size_t card_num, bool for_young_gc) const;
-
- double predict_mixed_rs_scan_time_ms(size_t card_num) const;
+ double predict_card_merge_time_ms(size_t card_num, bool for_young_gc) const;
+ double predict_card_scan_time_ms(size_t card_num, bool for_young_gc) const;
double predict_object_copy_time_ms_during_cm(size_t bytes_to_copy) const;
double predict_object_copy_time_ms(size_t bytes_to_copy, bool during_concurrent_mark) const;
@@ -151,12 +155,10 @@
double predict_cleanup_time_ms() const;
size_t predict_rs_length() const;
size_t predict_pending_cards() const;
- double predict_cost_per_byte_ms() const;
-
// Add a new GC of the given duration and end time to the record.
void update_recent_gc_times(double end_time_sec, double elapsed_ms);
void compute_pause_time_ratio(double interval_ms, double pause_time_ms);
double last_known_gc_end_time_sec() const;
< prev index next >