From 28ad5e6b1100a7f0d25a5e6741f7241a86cf61bd Mon Sep 17 00:00:00 2001 From: georgesak Date: Thu, 16 Apr 2015 02:25:19 -0700 Subject: Add option to export tracing events to ETW. - Exporting of ETW events can be turned on using --trace-export-events-to-etw. BUG= Committed: https://crrev.com/1cc86c4f686869f32dfede093a07828c73563892 Cr-Commit-Position: refs/heads/master@{#324982} Review URL: https://codereview.chromium.org/1038453002 Cr-Commit-Position: refs/heads/master@{#325408} --- content/app/content_main_runner.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'content/app/content_main_runner.cc') diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index 42f1865..0db941a 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -77,6 +77,7 @@ #include #include "base/strings/string_number_conversions.h" +#include "base/trace_event/trace_event_etw_export_win.h" #include "ui/base/win/atl_module.h" #include "ui/gfx/win/dpi.h" #elif defined(OS_MACOSX) @@ -632,6 +633,12 @@ class ContentMainRunnerImpl : public ContentMainRunner { base::trace_event::TraceOptions( base::trace_event::RECORD_UNTIL_FULL)); } +#if defined(OS_WIN) + // Enable exporting of events to ETW if requested on the command line. + if (command_line.HasSwitch(switches::kTraceExportEventsToETW)) + base::trace_event::TraceEventETWExport::EnableETWExport(); +#endif // OS_WIN + #if !defined(OS_ANDROID) // Android tracing started at the beginning of the method. // Other OSes have to wait till we get here in order for all the memory -- cgit v1.1