summaryrefslogtreecommitdiffstats
path: root/base/profiler.cc
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 00:36:35 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 00:36:35 +0000
commitdf42d4adc3280f1e0cbba03b76fdab59ad2abf11 (patch)
treeb10fc91ef39c1a10b158631a887fef3b823bbe51 /base/profiler.cc
parentadd87127f39d469a8e48666e826f8c80051cf9ef (diff)
downloadchromium_src-df42d4adc3280f1e0cbba03b76fdab59ad2abf11.zip
chromium_src-df42d4adc3280f1e0cbba03b76fdab59ad2abf11.tar.gz
chromium_src-df42d4adc3280f1e0cbba03b76fdab59ad2abf11.tar.bz2
Refactor Quantify Profiling a bit.
This lets you use regular full-optimization Release builds. Review URL: http://codereview.chromium.org/53022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12424 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/profiler.cc')
-rw-r--r--base/profiler.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/base/profiler.cc b/base/profiler.cc
index acb00c4..75c5cad 100644
--- a/base/profiler.cc
+++ b/base/profiler.cc
@@ -5,35 +5,38 @@
#include "base/profiler.h"
#include "base/string_util.h"
-#ifdef PURIFY
+// When actually using quantify, uncomment the following line.
+//#define QUANTIFY
+
+#ifdef QUANTIFY
// this #define is used to prevent people from directly using pure.h
// instead of profiler.h
#define PURIFY_PRIVATE_INCLUDE
#include "base/third_party/purify/pure.h"
-#endif
+#endif // QUANTIFY
namespace base {
void Profiler::StartRecording() {
-#ifdef PURIFY
+#ifdef QUANTIFY
QuantifyStartRecordingData();
#endif
}
void Profiler::StopRecording() {
-#ifdef PURIFY
+#ifdef QUANTIFY
QuantifyStopRecordingData();
#endif
}
void Profiler::ClearData() {
-#ifdef PURIFY
+#ifdef QUANTIFY
QuantifyClearData();
#endif
}
void Profiler::SetThreadName(const char *name) {
-#ifdef PURIFY
+#ifdef QUANTIFY
// make a copy since the Quantify function takes a char*, not const char*
char buffer[512];
base::snprintf(buffer, sizeof(buffer)-1, "%s", name);