diff options
author | georgesak <georgesak@chromium.org> | 2015-04-13 18:36:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-14 01:37:57 +0000 |
commit | 1cc86c4f686869f32dfede093a07828c73563892 (patch) | |
tree | 256f51e5a02376d70d06014f173df09ece8594c7 /content | |
parent | 3455a3e0cbbd6b1d812518251589f0646b0a1518 (diff) | |
download | chromium_src-1cc86c4f686869f32dfede093a07828c73563892.zip chromium_src-1cc86c4f686869f32dfede093a07828c73563892.tar.gz chromium_src-1cc86c4f686869f32dfede093a07828c73563892.tar.bz2 |
Add option to export tracing events to ETW.
- Exporting of ETW events can be turned on using --trace-export-events-to-etw.
BUG=
Review URL: https://codereview.chromium.org/1038453002
Cr-Commit-Position: refs/heads/master@{#324982}
Diffstat (limited to 'content')
-rw-r--r-- | content/app/content_main_runner.cc | 7 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 1 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 4 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 1 |
4 files changed, 13 insertions, 0 deletions
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 <cstring> #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 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 2f48c18..ba00a69 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1381,6 +1381,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( switches::kDisableDirectWrite, switches::kEnableWin32kRendererLockDown, switches::kDisableWin32kRendererLockDown, + switches::kTraceExportEventsToETW, #endif #if defined(OS_CHROMEOS) switches::kDisableVaapiAcceleratedVideoEncode, diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 17e95ef..d4fd005 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -987,6 +987,10 @@ const char kEnableWin32kRendererLockDown[] = // This switch allows specifying suffix to shared memory section name to avoid // clashes between different instances of Chrome. const char kFontCacheSharedMemSuffix[] = "font-cache-shared-mem-suffix"; + +// Enables the exporting of the tracing events to ETW. This is only supported on +// Windows Vista and later. +const char kTraceExportEventsToETW[] = "trace-export-events-to-etw"; #endif // Enables the use of NPAPI plugins. diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index a8c8608..00dd881 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -297,6 +297,7 @@ CONTENT_EXPORT extern const char kEnableWin32kRendererLockDown[]; // Switch to uniquely identify names shared memory section for font cache // across chromium flavors. CONTENT_EXPORT extern const char kFontCacheSharedMemSuffix[]; +CONTENT_EXPORT extern const char kTraceExportEventsToETW[]; #endif CONTENT_EXPORT extern const char kEnableNpapi[]; |