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

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

Issue 7050034: Merge google-perftools r109 (the current contents of third_party/tcmalloc/vendor) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
===================================================================
--- third_party/tcmalloc/chromium/src/tests/sampler_test.cc (revision 88335)
+++ third_party/tcmalloc/chromium/src/tests/sampler_test.cc (working copy)
@@ -87,7 +87,7 @@
char buf[256]; // should be big enough for all logging
va_list ap;
va_start(ap, format);
- vsnprintf(buf, sizeof(buf), format, ap);
+ perftools_vsnprintf(buf, sizeof(buf), format, ap);
va_end(ap);
return buf;
}
@@ -647,6 +647,11 @@
LOG(INFO) << "Size of Sampler object is: " << sizeof(sampler);
}
+// Make sure sampling is enabled, or the tests won't work right.
+DECLARE_int64(tcmalloc_sample_parameter);
+
int main(int argc, char **argv) {
+ if (FLAGS_tcmalloc_sample_parameter == 0)
+ FLAGS_tcmalloc_sample_parameter = 524288;
return RUN_ALL_TESTS();
}
« no previous file with comments | « third_party/tcmalloc/chromium/src/tests/realloc_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