8252859: Inconsistent use of alpha in class AbsSeq
Reviewed-by: tschatzl, sjohanss
This commit is contained in:
parent
4fb1980fd0
commit
76002747d5
@ -91,8 +91,8 @@ G1AdaptiveIHOPControl::G1AdaptiveIHOPControl(double ihop_percent,
|
||||
_heap_reserve_percent(heap_reserve_percent),
|
||||
_heap_waste_percent(heap_waste_percent),
|
||||
_predictor(predictor),
|
||||
_marking_times_s(10, 0.95),
|
||||
_allocation_rate_s(10, 0.95),
|
||||
_marking_times_s(10, 0.05),
|
||||
_allocation_rate_s(10, 0.05),
|
||||
_last_unrestrained_young_size(0)
|
||||
{
|
||||
}
|
||||
|
@ -1029,7 +1029,7 @@ public:
|
||||
uint64_t ZStatCycle::_nwarmup_cycles = 0;
|
||||
Ticks ZStatCycle::_start_of_last;
|
||||
Ticks ZStatCycle::_end_of_last;
|
||||
NumberSeq ZStatCycle::_normalized_duration(0.3 /* alpha */);
|
||||
NumberSeq ZStatCycle::_normalized_duration(0.7 /* alpha */);
|
||||
|
||||
void ZStatCycle::at_start() {
|
||||
_start_of_last = Ticks::now();
|
||||
|
@ -47,11 +47,10 @@ void AbsSeq::add(double val) {
|
||||
// mean := mean + incr
|
||||
// variance := (1 - alpha) * (variance + diff * incr)
|
||||
// PDF available at https://fanf2.user.srcf.net/hermes/doc/antiforgery/stats.pdf
|
||||
// Note: alpha is actually (1.0 - _alpha) in our code
|
||||
double diff = val - _davg;
|
||||
double incr = (1.0 - _alpha) * diff;
|
||||
double incr = _alpha * diff;
|
||||
_davg += incr;
|
||||
_dvariance = _alpha * (_dvariance + diff * incr);
|
||||
_dvariance = (1.0 - _alpha) * (_dvariance + diff * incr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
** of the sequence and calculates avg, max, and sd only over them
|
||||
**/
|
||||
|
||||
#define DEFAULT_ALPHA_VALUE 0.7
|
||||
#define DEFAULT_ALPHA_VALUE 0.3
|
||||
|
||||
class AbsSeq: public CHeapObj<mtInternal> {
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user