AbsSeq._dvariance is correct?

Narihiro Nakamura authornari at gmail.com
Sat Nov 27 17:15:23 UTC 2010


Hi all.

I read G1GC because I had an interest in it.
I have one question. AbsSeq._dvariance is correct?

Please read the following patche.

diff -r beef35b96b81 src/share/vm/utilities/numberSeq.cpp
--- a/src/share/vm/utilities/numberSeq.cpp      Fri Oct 01 15:45:01 2010 -0700
+++ b/src/share/vm/utilities/numberSeq.cpp      Sun Nov 28 01:54:23 2010 +0900
@@ -40,7 +40,7 @@
     // otherwise, calculate both
     _davg = (1.0 - _alpha) * val + _alpha * _davg;
     double diff = val - _davg;
-    _dvariance = (1.0 - _alpha) * diff * diff + _alpha * _dvariance;
+    _dvariance = (1.0 - _alpha) * (diff * diff) + _alpha * _dvariance;
   }
 }

I'm sorry if it is misunderstand.

Regards.

-- 
Narihiro Nakamura (nari)



More information about the hotspot-gc-dev mailing list