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

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

Issue 1376793004: Remove the TRACE_EVENT_*_ETW macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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_win_unittest.cc ('k') | base/trace_event/trace_log.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_
6 #define BASE_TRACE_EVENT_TRACE_LOG_H_ 6 #define BASE_TRACE_EVENT_TRACE_LOG_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/trace_event/memory_dump_provider.h" 9 #include "base/trace_event/memory_dump_provider.h"
10 #include "base/trace_event/trace_config.h" 10 #include "base/trace_event/trace_config.h"
11 #include "base/trace_event/trace_event_impl.h" 11 #include "base/trace_event/trace_event_impl.h"
12 12
13 // Older style trace macros with explicit id and extra data
14 // Only these macros result in publishing data to ETW as currently implemented.
15 // TODO(georgesak): Update/replace these with new ETW macros.
16 #define TRACE_EVENT_BEGIN_ETW(name, id, extra) \
17 base::trace_event::TraceLog::AddTraceEventEtw( \
18 TRACE_EVENT_PHASE_BEGIN, name, reinterpret_cast<const void*>(id), extra)
19
20 #define TRACE_EVENT_END_ETW(name, id, extra) \
21 base::trace_event::TraceLog::AddTraceEventEtw( \
22 TRACE_EVENT_PHASE_END, name, reinterpret_cast<const void*>(id), extra)
23
24 #define TRACE_EVENT_INSTANT_ETW(name, id, extra) \
25 base::trace_event::TraceLog::AddTraceEventEtw( \
26 TRACE_EVENT_PHASE_INSTANT, name, reinterpret_cast<const void*>(id), \
27 extra)
28
29 namespace base { 13 namespace base {
30 14
31 template <typename Type> 15 template <typename Type>
32 struct DefaultSingletonTraits; 16 struct DefaultSingletonTraits;
33 class RefCountedString; 17 class RefCountedString;
34 18
35 namespace trace_event { 19 namespace trace_event {
36 20
37 class TraceBuffer; 21 class TraceBuffer;
38 class TraceBufferChunk; 22 class TraceBufferChunk;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 unsigned long long context_id, 217 unsigned long long context_id,
234 unsigned long long bind_id, 218 unsigned long long bind_id,
235 int thread_id, 219 int thread_id,
236 const TraceTicks& timestamp, 220 const TraceTicks& timestamp,
237 int num_args, 221 int num_args,
238 const char** arg_names, 222 const char** arg_names,
239 const unsigned char* arg_types, 223 const unsigned char* arg_types,
240 const unsigned long long* arg_values, 224 const unsigned long long* arg_values,
241 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 225 const scoped_refptr<ConvertableToTraceFormat>* convertable_values,
242 unsigned int flags); 226 unsigned int flags);
243 static void AddTraceEventEtw(char phase,
244 const char* category_group,
245 const void* id,
246 const char* extra);
247 static void AddTraceEventEtw(char phase,
248 const char* category_group,
249 const void* id,
250 const std::string& extra);
251 227
252 void UpdateTraceEventDuration(const unsigned char* category_group_enabled, 228 void UpdateTraceEventDuration(const unsigned char* category_group_enabled,
253 const char* name, 229 const char* name,
254 TraceEventHandle handle); 230 TraceEventHandle handle);
255 231
256 // For every matching event, the callback will be called. 232 // For every matching event, the callback will be called.
257 typedef base::Callback<void()> WatchEventCallback; 233 typedef base::Callback<void()> WatchEventCallback;
258 void SetWatchEvent(const std::string& category_name, 234 void SetWatchEvent(const std::string& category_name,
259 const std::string& event_name, 235 const std::string& event_name,
260 const WatchEventCallback& callback); 236 const WatchEventCallback& callback);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 subtle::AtomicWord generation_; 461 subtle::AtomicWord generation_;
486 bool use_worker_thread_; 462 bool use_worker_thread_;
487 463
488 DISALLOW_COPY_AND_ASSIGN(TraceLog); 464 DISALLOW_COPY_AND_ASSIGN(TraceLog);
489 }; 465 };
490 466
491 } // namespace trace_event 467 } // namespace trace_event
492 } // namespace base 468 } // namespace base
493 469
494 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ 470 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_win_unittest.cc ('k') | base/trace_event/trace_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698