diff -r 2d65c2f76d7b -r 947f0dc9f7a8 kerneltest/e32test/bench/t_r64fnc.cpp --- a/kerneltest/e32test/bench/t_r64fnc.cpp Tue Feb 02 01:24:03 2010 +0200 +++ b/kerneltest/e32test/bench/t_r64fnc.cpp Fri Apr 16 16:24:37 2010 +0300 @@ -33,15 +33,24 @@ 76.1, 9, 56.1, 1/9, 1/3, 22, 99.7, 42}; -GLREF_D volatile TUint count; +GLREF_D volatile TUint Count; + +#include + +void Step() + { + if (++Count & 0xffff) + return; + BTrace4(BTrace::ETest1, 0, Count); + } TInt TReal64Addition(TAny*) { - count=0; + Count=0; FOREVER { - r=AntiOptimization[count & 0xf]; + r=AntiOptimization[Count & 0xf]; r+=One; r+=One; r+=One; @@ -52,17 +61,17 @@ r+=One; r+=One; r+=One; - count++; + Step(); } } TInt TReal64Subtraction(TAny*) { - count=0; + Count=0; FOREVER { - r=AntiOptimization[count & 0xf]; + r=AntiOptimization[Count & 0xf]; r-=Ten; r-=Ten; r-=Ten; @@ -73,16 +82,16 @@ r-=Ten; r-=Ten; r-=Ten; - count++; + Step(); } } TInt TReal64Multiplication(TAny*) { - count=0; + Count=0; FOREVER { - r=AntiOptimization[count & 0xf]; + r=AntiOptimization[Count & 0xf]; r*=Pi; r*=Pi; r*=Pi; @@ -93,17 +102,17 @@ r*=Pi; r*=Pi; r*=Pi; - count++; + Step(); } } TInt TReal64Division(TAny*) { - count=0; + Count=0; FOREVER { - r=AntiOptimization[count & 0xf]; + r=AntiOptimization[Count & 0xf]; r/=Ten; r/=Ten; r/=Ten; @@ -114,12 +123,13 @@ r/=Ten; r/=Ten; r/=Ten; - count++; + Step(); } } TInt TRealSqrt(TAny*) { + Count=0; TReal r; @@ -135,12 +145,13 @@ Math::Sqrt(r,1.414213562373); Math::Sqrt(r,1.7320508078); Math::Sqrt(r,299792458.0); - count++; + Step(); } } TInt TRealSin(TAny*) { + Count=0; TReal r=7; @@ -156,12 +167,13 @@ Math::Sin(r,8.0); Math::Sin(r,9.0); Math::Sin(r,-1.0); - count++; + Step(); } } TInt TRealLn(TAny*) { + Count=0; TReal r=7; @@ -177,12 +189,13 @@ Math::Ln(r,11.0); Math::Ln(r,13.0); Math::Ln(r,17.0); - count++; + Step(); } } TInt TRealExp(TAny*) { + Count=0; TReal r=7; @@ -198,12 +211,13 @@ Math::Exp(r,-2.0); Math::Exp(r,11.0); Math::Exp(r,-11.0); - count++; + Step(); } } TInt TRealAsin(TAny*) { + Count=0; TReal r=7; @@ -219,12 +233,13 @@ Math::ASin(r,0.8); Math::ASin(r,0.9); Math::ASin(r,-0.9); - count++; + Step(); } } TInt TRealAtan(TAny*) { + Count=0; TReal r=7; @@ -240,12 +255,13 @@ Math::ATan(r,1.5); Math::ATan(r,1.7); Math::ATan(r,2.9); - count++; + Step(); } } TInt TRealTan(TAny*) { + Count=0; TReal r=7; @@ -261,12 +277,13 @@ Math::Tan(r,8.0); Math::Tan(r,9.0); Math::Tan(r,-1.0); - count++; + Step(); } } TInt TRealPower(TAny*) { + Count=0; TReal r=7; @@ -282,7 +299,7 @@ Math::Pow(r,95.4,1.57079); Math::Pow(r,317.9,0.3333333333333333); Math::Pow(r,299792458,-2.718281828459045235); - count++; + Step(); } }