mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
6631166
: CMS: better heuristics when combatting fragmentation
Autonomic per-worker free block cache sizing, tunable coalition policies, fixes to per-size block statistics, retuned gain and bandwidth of some feedback loop filters to allow quicker reactivity to abrupt changes in ambient demand, and other heuristics to reduce fragmentation of the CMS old gen. Also tightened some assertions, including those related to locking. Reviewed-by: jmasa
This commit is contained in:
parent
1383dc414b
commit
272a6d47bb
26 changed files with 1099 additions and 345 deletions
|
@ -54,8 +54,8 @@ class AdaptiveWeightedAverage : public CHeapObj {
|
|||
|
||||
public:
|
||||
// Input weight must be between 0 and 100
|
||||
AdaptiveWeightedAverage(unsigned weight) :
|
||||
_average(0.0), _sample_count(0), _weight(weight), _last_sample(0.0) {
|
||||
AdaptiveWeightedAverage(unsigned weight, float avg = 0.0) :
|
||||
_average(avg), _sample_count(0), _weight(weight), _last_sample(0.0) {
|
||||
}
|
||||
|
||||
void clear() {
|
||||
|
@ -64,6 +64,13 @@ class AdaptiveWeightedAverage : public CHeapObj {
|
|||
_last_sample = 0;
|
||||
}
|
||||
|
||||
// Useful for modifying static structures after startup.
|
||||
void modify(size_t avg, unsigned wt, bool force = false) {
|
||||
assert(force, "Are you sure you want to call this?");
|
||||
_average = (float)avg;
|
||||
_weight = wt;
|
||||
}
|
||||
|
||||
// Accessors
|
||||
float average() const { return _average; }
|
||||
unsigned weight() const { return _weight; }
|
||||
|
@ -83,6 +90,10 @@ class AdaptiveWeightedAverage : public CHeapObj {
|
|||
// Convert to float and back to avoid integer overflow.
|
||||
return (size_t)exp_avg((float)avg, (float)sample, weight);
|
||||
}
|
||||
|
||||
// Printing
|
||||
void print_on(outputStream* st) const;
|
||||
void print() const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -129,6 +140,10 @@ class AdaptivePaddedAverage : public AdaptiveWeightedAverage {
|
|||
|
||||
// Override
|
||||
void sample(float new_sample);
|
||||
|
||||
// Printing
|
||||
void print_on(outputStream* st) const;
|
||||
void print() const;
|
||||
};
|
||||
|
||||
// A weighted average that includes a deviation from the average,
|
||||
|
@ -146,7 +161,12 @@ public:
|
|||
AdaptivePaddedAverage(weight, padding) {}
|
||||
// Override
|
||||
void sample(float new_sample);
|
||||
|
||||
// Printing
|
||||
void print_on(outputStream* st) const;
|
||||
void print() const;
|
||||
};
|
||||
|
||||
// Use a least squares fit to a set of data to generate a linear
|
||||
// equation.
|
||||
// y = intercept + slope * x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue