< prev index next >
src/hotspot/share/gc/g1/g1Policy.hpp
Print this page
rev 56969 : imported patch 8228609-used-vs-copied-bytes
rev 56971 : imported patch 8227739-merge-scan-rs-update-rs-cost
rev 56981 : imported patch 8233588-cleanup-survrategroup
rev 56982 : [mq]: 8231579-incremental-calculation-wrong
@@ -82,11 +82,11 @@
// locker is active. This should be >= _young_list_target_length;
uint _young_list_max_length;
// SurvRateGroups below must be initialized after the predictor because they
// indirectly use it through this object passed to their constructor.
- SurvRateGroup* _short_lived_surv_rate_group;
+ SurvRateGroup* _eden_surv_rate_group;
SurvRateGroup* _survivor_surv_rate_group;
double _reserve_factor;
// This will be set when the heap is expanded
// for the first time during initialization.
@@ -126,11 +126,11 @@
// Add the given number of bytes to the total number of allocated bytes in the old gen.
void add_bytes_allocated_in_old_since_last_gc(size_t bytes) { _bytes_allocated_in_old_since_last_gc += bytes; }
void set_region_eden(HeapRegion* hr) {
hr->set_eden();
- hr->install_surv_rate_group(_short_lived_surv_rate_group);
+ hr->install_surv_rate_group(_eden_surv_rate_group);
}
void set_region_survivor(HeapRegion* hr) {
assert(hr->is_survivor(), "pre-condition");
hr->install_surv_rate_group(_survivor_surv_rate_group);
@@ -139,21 +139,26 @@
void record_rs_length(size_t rs_length) {
_rs_length = rs_length;
}
double predict_base_elapsed_time_ms(size_t num_pending_cards) const;
- double predict_base_elapsed_time_ms(size_t num_pending_cards,
- size_t rs_length) const;
- size_t predict_bytes_to_copy(HeapRegion* hr) const;
- double predict_region_elapsed_time_ms(HeapRegion* hr, bool for_young_gc) const;
- double predict_survivor_regions_evac_time() const;
+private:
+ double predict_base_elapsed_time_ms(size_t num_pending_cards, size_t rs_length) const;
+
+ double predict_region_copy_time_ms(HeapRegion* hr) const;
+
+public:
+
+ double predict_eden_copy_time_ms(uint count, size_t* bytes_to_copy = NULL) const;
+ double predict_region_non_copy_time_ms(HeapRegion* hr, bool for_young_gc) const;
+ double predict_region_total_time_ms(HeapRegion* hr, bool for_young_gc) const;
void cset_regions_freed() {
bool update = should_update_surv_rate_group_predictors();
- _short_lived_surv_rate_group->all_surviving_words_recorded(predictor(), update);
+ _eden_surv_rate_group->all_surviving_words_recorded(predictor(), update);
_survivor_surv_rate_group->all_surviving_words_recorded(predictor(), update);
}
G1MMUTracker* mmu_tracker() {
return _mmu_tracker;
@@ -165,12 +170,10 @@
double max_pause_time_ms() const {
return _mmu_tracker->max_gc_time() * 1000.0;
}
- double accum_yg_surv_rate_pred(int age) const;
-
private:
G1CollectionSet* _collection_set;
double average_time_ms(G1GCPhaseTimes::GCParPhases phase) const;
double other_time_ms(double pause_time_ms) const;
@@ -230,10 +233,13 @@
YoungTargetLengths young_list_target_lengths(size_t rs_length) const;
void update_rs_length_prediction();
void update_rs_length_prediction(size_t prediction);
+ size_t predict_bytes_to_copy(HeapRegion* hr) const;
+ double predict_survivor_regions_evac_time() const;
+
// Check whether a given young length (young_length) fits into the
// given target pause time and whether the prediction for the amount
// of objects to be copied for the given length will fit into the
// given free space (expressed by base_free_regions). It is used by
// calculate_young_list_target_length().
< prev index next >