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

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

Issue 869043008: Reland of Move tracing namespace from base::debug to base::trace_event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Fix suppressions Created 5 years, 10 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 | « base/trace_event/trace_event_unittest.cc ('k') | base/trace_event/trace_event_win.cc » ('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 // 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_TRACE_EVENT_TRACE_EVENT_WIN_H_ 6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_WIN_H_
7 #define BASE_TRACE_EVENT_TRACE_EVENT_WIN_H_ 7 #define BASE_TRACE_EVENT_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/trace_event/trace_event.h" 12 #include "base/trace_event/trace_event.h"
13 #include "base/win/event_trace_provider.h" 13 #include "base/win/event_trace_provider.h"
14 14
15 // Fwd. 15 // Fwd.
16 template <typename Type> 16 template <typename Type>
17 struct StaticMemorySingletonTraits; 17 struct StaticMemorySingletonTraits;
18 18
19 namespace base { 19 namespace base {
20 namespace debug { 20 namespace trace_event {
21 21
22 // This EtwTraceProvider subclass implements ETW logging 22 // This EtwTraceProvider subclass implements ETW logging
23 // for the macros above on Windows. 23 // for the macros above on Windows.
24 class BASE_EXPORT TraceEventETWProvider : public base::win::EtwTraceProvider { 24 class BASE_EXPORT TraceEventETWProvider : public base::win::EtwTraceProvider {
25 public: 25 public:
26 static const size_t kUseStrlen = static_cast<size_t>(-1); 26 static const size_t kUseStrlen = static_cast<size_t>(-1);
27 27
28 // Start logging trace events. 28 // Start logging trace events.
29 // This is a noop in this implementation. 29 // This is a noop in this implementation.
30 static bool StartTracing(); 30 static bool StartTracing();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 CAPTURE_STACK_TRACE = 0x0001, 112 CAPTURE_STACK_TRACE = 0x0001,
113 }; 113 };
114 114
115 // The event format consists of: 115 // The event format consists of:
116 // The "name" string as a zero-terminated ASCII string. 116 // The "name" string as a zero-terminated ASCII string.
117 // The id pointer in the machine bitness. 117 // The id pointer in the machine bitness.
118 // The "extra" string as a zero-terminated ASCII string. 118 // The "extra" string as a zero-terminated ASCII string.
119 // Optionally the stack trace, consisting of a DWORD "depth", followed 119 // Optionally the stack trace, consisting of a DWORD "depth", followed
120 // by an array of void* (machine bitness) of length "depth". 120 // by an array of void* (machine bitness) of length "depth".
121 121
122 } // namespace trace_event
123 } // namespace base
124
125 // TODO(ssid): remove these aliases after the tracing clients are moved to the
126 // new trace_event namespace. See crbug.com/451032. ETA: March 2015.
127 namespace base {
128 namespace debug {
129 using base::trace_event::kChromeTraceProviderName;
130 using base::trace_event::kTraceEventClass32;
131 using base::trace_event::kTraceEventClass64;
132 using base::trace_event::kTraceEventTypeBegin;
133 using base::trace_event::kTraceEventTypeEnd;
134 using base::trace_event::kTraceEventTypeInstant;
135 using base::trace_event::TraceEventETWProvider;
122 } // namespace debug 136 } // namespace debug
123 } // namespace base 137 } // namespace base
124 138
125 #endif // BASE_TRACE_EVENT_TRACE_EVENT_WIN_H_ 139 #endif // BASE_TRACE_EVENT_TRACE_EVENT_WIN_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_unittest.cc ('k') | base/trace_event/trace_event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698