Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1133)

Side by Side Diff: base/debug/trace_event_impl.cc

Issue 23934003: Have all trace points emit to ETW. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/debug/trace_event_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/debug/trace_event_impl.h" 5 #include "base/debug/trace_event_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 const char* name, 1694 const char* name,
1695 unsigned long long id, 1695 unsigned long long id,
1696 int thread_id, 1696 int thread_id,
1697 const TimeTicks& timestamp, 1697 const TimeTicks& timestamp,
1698 int num_args, 1698 int num_args,
1699 const char** arg_names, 1699 const char** arg_names,
1700 const unsigned char* arg_types, 1700 const unsigned char* arg_types,
1701 const unsigned long long* arg_values, 1701 const unsigned long long* arg_values,
1702 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 1702 const scoped_refptr<ConvertableToTraceFormat>* convertable_values,
1703 unsigned char flags) { 1703 unsigned char flags) {
1704 #if defined (OS_WIN)
1705 TraceEventETWProvider::TraceWithArgs(
1706 GetCategoryGroupName(category_group_enabled), name, phase,
1707 id, num_args, arg_names, arg_types, arg_values, convertable_values);
1708 #endif
1709
1704 TraceEventHandle handle = { 0, 0, 0 }; 1710 TraceEventHandle handle = { 0, 0, 0 };
1705 if (!*category_group_enabled) 1711 if (!*category_group_enabled)
1706 return handle; 1712 return handle;
1707 1713
1708 // Avoid re-entrance of AddTraceEvent. This may happen in GPU process when 1714 // Avoid re-entrance of AddTraceEvent. This may happen in GPU process when
1709 // ECHO_TO_CONSOLE is enabled: AddTraceEvent -> LOG(ERROR) -> 1715 // ECHO_TO_CONSOLE is enabled: AddTraceEvent -> LOG(ERROR) ->
1710 // GpuProcessLogMessageHandler -> PostPendingTask -> TRACE_EVENT ... 1716 // GpuProcessLogMessageHandler -> PostPendingTask -> TRACE_EVENT ...
1711 if (thread_is_in_trace_event_.Get()) 1717 if (thread_is_in_trace_event_.Get())
1712 return handle; 1718 return handle;
1713 1719
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2322 } 2328 }
2323 2329
2324 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 2330 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
2325 if (*category_group_enabled_) { 2331 if (*category_group_enabled_) {
2326 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, 2332 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_,
2327 name_, event_handle_); 2333 name_, event_handle_);
2328 } 2334 }
2329 } 2335 }
2330 2336
2331 } // namespace trace_event_internal 2337 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « no previous file | base/debug/trace_event_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698