Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/tcmalloc/chromium/src/tests/sampler_test.cc

Issue 9311003: Update the tcmalloc chromium branch to r144 (gperftools 2.0), and merge chromium-specific changes. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebasec Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/tests/sampler_test.cc
diff --git a/third_party/tcmalloc/chromium/src/tests/sampler_test.cc b/third_party/tcmalloc/chromium/src/tests/sampler_test.cc
index 31c87cdca8ecb80c67e12da69369f5ec66955b09..c55d5dceafaa6a9ed699ceb68da8be2f11ad14a9 100644
--- a/third_party/tcmalloc/chromium/src/tests/sampler_test.cc
+++ b/third_party/tcmalloc/chromium/src/tests/sampler_test.cc
@@ -357,7 +357,7 @@ bool CheckMean(size_t mean, int num_samples) {
}
double empirical_mean = total / static_cast<double>(num_samples);
double expected_sd = mean / pow(num_samples * 1.0, 0.5);
- return(abs(mean-empirical_mean) < expected_sd * kSigmas);
+ return(fabs(mean-empirical_mean) < expected_sd * kSigmas);
}
// Prints a sequence so you can look at the distribution
@@ -409,8 +409,8 @@ TEST(Sampler, LargeAndSmallAllocs_CombinedTest) {
size_small, kSamplingInterval);
LOG(INFO) << StringPrintf("large_allocs_sds = %f\n", large_allocs_sds);
LOG(INFO) << StringPrintf("small_allocs_sds = %f\n", small_allocs_sds);
- CHECK_LE(abs(large_allocs_sds), kSigmas);
- CHECK_LE(abs(small_allocs_sds), kSigmas);
+ CHECK_LE(fabs(large_allocs_sds), kSigmas);
+ CHECK_LE(fabs(small_allocs_sds), kSigmas);
}
// Tests whether the mean is about right over 1000 samples
« no previous file with comments | « third_party/tcmalloc/chromium/src/tests/profiler_unittest.cc ('k') | third_party/tcmalloc/chromium/src/tests/sampling_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698