1.1 --- a/src/share/vm/gc_implementation/shared/gcUtil.hpp Mon Jul 14 04:12:47 2008 -0700 1.2 +++ b/src/share/vm/gc_implementation/shared/gcUtil.hpp Thu Jul 17 10:26:33 2008 -0700 1.3 @@ -58,6 +58,12 @@ 1.4 _average(0.0), _sample_count(0), _weight(weight), _last_sample(0.0) { 1.5 } 1.6 1.7 + void clear() { 1.8 + _average = 0; 1.9 + _sample_count = 0; 1.10 + _last_sample = 0; 1.11 + } 1.12 + 1.13 // Accessors 1.14 float average() const { return _average; } 1.15 unsigned weight() const { return _weight; } 1.16 @@ -115,6 +121,12 @@ 1.17 float deviation() const { return _deviation; } 1.18 unsigned padding() const { return _padding; } 1.19 1.20 + void clear() { 1.21 + AdaptiveWeightedAverage::clear(); 1.22 + _padded_avg = 0; 1.23 + _deviation = 0; 1.24 + } 1.25 + 1.26 // Override 1.27 void sample(float new_sample); 1.28 };