summaryrefslogtreecommitdiffstats
path: root/base/trace_event.h
diff options
context:
space:
mode:
authorsiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-07 20:25:49 +0000
committersiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-07 20:25:49 +0000
commit3e56955fa25579255bb139dd1c33804c4a7fee14 (patch)
tree4696e27fe553913b5eba1c84b844c7729ab9b0e4 /base/trace_event.h
parent57f41723adadcd22c72674d413fee54a581ad6cc (diff)
downloadchromium_src-3e56955fa25579255bb139dd1c33804c4a7fee14.zip
chromium_src-3e56955fa25579255bb139dd1c33804c4a7fee14.tar.gz
chromium_src-3e56955fa25579255bb139dd1c33804c4a7fee14.tar.bz2
Divert TRACE_EVENT macros to use Event Tracing for Windows on Windows builds.
This is in preparation for instrumenting Chrome and Chrome Frame for performance measurements with ETW. BUG=none TEST=Unittests in this CL. Review URL: http://codereview.chromium.org/2020002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/trace_event.h')
-rw-r--r--base/trace_event.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/base/trace_event.h b/base/trace_event.h
index 46b8a37..7537b97 100644
--- a/base/trace_event.h
+++ b/base/trace_event.h
@@ -18,8 +18,10 @@
#include "build/build_config.h"
#if defined(OS_WIN)
-#include <windows.h>
-#endif
+// On Windows we always pull in an alternative implementation
+// which logs to Event Tracing for Windows.
+#include "base/trace_event_win.h"
+#else // defined(OS_WIN)
#include <string>
@@ -34,7 +36,7 @@
#define TRACE_EVENT_END(name, id, extra) ((void) 0)
#define TRACE_EVENT_INSTANT(name, id, extra) ((void) 0)
-#else
+#else // CHROMIUM_ENABLE_TRACE_EVENT
// 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);
@@ -129,5 +131,6 @@ class TraceLog {
};
} // namespace base
+#endif // defined(OS_WIN)
#endif // BASE_TRACE_EVENT_H_