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

Side by Side Diff: base/debug/trace_event_win.h

Issue 23934003: Have all trace points emit to ETW. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 3 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
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 // This file contains the Windows-specific declarations for trace_event.h. 5 // This file contains the Windows-specific declarations for trace_event.h.
6 #ifndef BASE_DEBUG_TRACE_EVENT_WIN_H_ 6 #ifndef BASE_DEBUG_TRACE_EVENT_WIN_H_
7 #define BASE_DEBUG_TRACE_EVENT_WIN_H_ 7 #define BASE_DEBUG_TRACE_EVENT_WIN_H_
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/base_export.h" 11 #include "base/base_export.h"
12 #include "base/debug/trace_event.h" 12 #include "base/debug/trace_event.h"
13 #include "base/memory/scoped_ptr.h"
13 #include "base/win/event_trace_provider.h" 14 #include "base/win/event_trace_provider.h"
14 15
15 // Fwd. 16 // Fwd.
16 template <typename Type> 17 template <typename Type>
17 struct StaticMemorySingletonTraits; 18 struct StaticMemorySingletonTraits;
18 19
19 namespace base { 20 namespace base {
20 namespace debug { 21 namespace debug {
21 22
22 // This EtwTraceProvider subclass implements ETW logging 23 // This EtwTraceProvider subclass implements ETW logging
(...skipping 28 matching lines...) Expand all
51 52
52 // Allows passing extra as a const char* to avoid constructing temporary 53 // Allows passing extra as a const char* to avoid constructing temporary
53 // std::string instances where not needed. 54 // std::string instances where not needed.
54 static void Trace(const char* name, 55 static void Trace(const char* name,
55 char type, 56 char type,
56 const void* id, 57 const void* id,
57 const char* extra) { 58 const char* extra) {
58 return Trace(name, -1, type, id, extra, -1); 59 return Trace(name, -1, type, id, extra, -1);
59 } 60 }
60 61
62 // Allows passing extra as a set of arguments that will be converted to
63 // a string.
chrisha 2013/09/05 20:21:30 This is a complicated call. Worth documenting the
fdoray 2013/09/08 18:35:50 Done.
64 static void TraceWithArgs(
65 const char* category_group,
66 const char* name,
67 char type,
68 const void* id,
69 int num_args,
70 const char** arg_names,
71 const unsigned char* arg_types,
72 const unsigned long long* arg_values,
73 scoped_ptr<ConvertableToTraceFormat> convertable_values[]);
74
61 // Retrieves the singleton. 75 // Retrieves the singleton.
62 // Note that this may return NULL post-AtExit processing. 76 // Note that this may return NULL post-AtExit processing.
63 static TraceEventETWProvider* GetInstance(); 77 static TraceEventETWProvider* GetInstance();
64 78
65 // Returns true iff tracing is turned on. 79 // Returns true iff tracing is turned on.
66 bool IsTracing() { 80 bool IsTracing() {
67 return enable_level() >= TRACE_LEVEL_INFORMATION; 81 return enable_level() >= TRACE_LEVEL_INFORMATION;
68 } 82 }
69 83
70 // Emit a trace of type |type| containing |name|, |id|, and |extra|. 84 // Emit a trace of type |type| containing |name|, |id|, and |extra|.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // The "name" string as a zero-terminated ASCII string. 128 // The "name" string as a zero-terminated ASCII string.
115 // The id pointer in the machine bitness. 129 // The id pointer in the machine bitness.
116 // The "extra" string as a zero-terminated ASCII string. 130 // The "extra" string as a zero-terminated ASCII string.
117 // Optionally the stack trace, consisting of a DWORD "depth", followed 131 // Optionally the stack trace, consisting of a DWORD "depth", followed
118 // by an array of void* (machine bitness) of length "depth". 132 // by an array of void* (machine bitness) of length "depth".
119 133
120 } // namespace debug 134 } // namespace debug
121 } // namespace base 135 } // namespace base
122 136
123 #endif // BASE_DEBUG_TRACE_EVENT_WIN_H_ 137 #endif // BASE_DEBUG_TRACE_EVENT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698