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

Unified Diff: third_party/tcmalloc/chromium/src/sampler.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
« no previous file with comments | « third_party/tcmalloc/chromium/src/sampler.h ('k') | third_party/tcmalloc/chromium/src/span.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/sampler.cc
===================================================================
--- third_party/tcmalloc/chromium/src/sampler.cc (revision 88335)
+++ third_party/tcmalloc/chromium/src/sampler.cc (working copy)
@@ -35,14 +35,15 @@
#include "sampler.h"
#include <algorithm> // For min()
-#include <cmath>
+#include <math.h>
+#include "base/commandlineflags.h"
using std::min;
// The approximate gap in bytes between sampling actions.
// I.e., we take one sample approximately once every
// tcmalloc_sample_parameter bytes of allocation
-// i.e. about once every 512KB.
+// i.e. about once every 512KB if value is 1<<19.
#ifdef NO_TCMALLOC_SAMPLES
DEFINE_int64(tcmalloc_sample_parameter, 0,
"Unused: code is compiled with NO_TCMALLOC_SAMPLES");
@@ -50,8 +51,7 @@
DEFINE_int64(tcmalloc_sample_parameter,
EnvToInt64("TCMALLOC_SAMPLE_PARAMETER", 0),
"The approximate gap in bytes between sampling actions. "
- "This must be between 1 and 1<<58.");
-// Note: there are other places in this file where the number 19 occurs.
+ "This must be between 1 and 2^58.");
#endif
namespace tcmalloc {
« no previous file with comments | « third_party/tcmalloc/chromium/src/sampler.h ('k') | third_party/tcmalloc/chromium/src/span.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698