summaryrefslogtreecommitdiffstats
path: root/base/trace_event.h
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 16:06:32 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 16:06:32 +0000
commit70a8d1a90a8a045da35e81b1561db19a03ff8c6f (patch)
treec89accb1ebc94a27b7182e3a63d3a713923fa98f /base/trace_event.h
parentecfa8b39fbfcf50ebdd50ee746940a471464f16e (diff)
downloadchromium_src-70a8d1a90a8a045da35e81b1561db19a03ff8c6f.zip
chromium_src-70a8d1a90a8a045da35e81b1561db19a03ff8c6f.tar.gz
chromium_src-70a8d1a90a8a045da35e81b1561db19a03ff8c6f.tar.bz2
Don't compile with TraceLog support on by default.
This is just some experimental performance code. Previously it was creating a singleton object which created a ProcessMetrics object. This caused a bunch of possibly expensive calls to query system information to happen on startup. Review URL: http://codereview.chromium.org/174118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/trace_event.h')
-rw-r--r--base/trace_event.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/trace_event.h b/base/trace_event.h
index d2b6ef1..a42c4d4 100644
--- a/base/trace_event.h
+++ b/base/trace_event.h
@@ -29,6 +29,12 @@
#include "base/time.h"
#include "base/timer.h"
+#ifndef CHROMIUM_ENABLE_TRACE_EVENT
+#define TRACE_EVENT_BEGIN(name, id, extra) ((void) 0)
+#define TRACE_EVENT_END(name, id, extra) ((void) 0)
+#define TRACE_EVENT_INSTANT(name, id, extra) ((void) 0)
+
+#else
// Use the following macros rather than using the TraceLog class directly as the
// underlying implementation may change in the future. Here's a sample usage:
// TRACE_EVENT_BEGIN("v8.run", documentId, scriptLocation);
@@ -63,6 +69,7 @@
extra, \
__FILE__, \
__LINE__)
+#endif // CHROMIUM_ENABLE_TRACE_EVENT
namespace base {
class ProcessMetrics;