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

Side by Side Diff: base/win/event_trace_consumer.h

Issue 171143002: Implements Windows system tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tracing
Patch Set: nits Created 6 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
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 // Declaration of a Windows event trace consumer base class. 5 // Declaration of a Windows event trace consumer base class.
6 #ifndef BASE_WIN_EVENT_TRACE_CONSUMER_H_ 6 #ifndef BASE_WIN_EVENT_TRACE_CONSUMER_H_
7 #define BASE_WIN_EVENT_TRACE_CONSUMER_H_ 7 #define BASE_WIN_EVENT_TRACE_CONSUMER_H_
8 8
9 #include <windows.h> 9 #include <windows.h>
10 #include <wmistr.h> 10 #include <wmistr.h>
11 #include <evntrace.h> 11 #include <evntrace.h>
12 #include <vector> 12 #include <vector>
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 14
15 namespace base { 15 namespace base {
16 namespace win { 16 namespace win {
17 17
18 // This class is a base class that makes it easier to consume events 18 // This class is a base class that makes it easier to consume events
19 // from realtime or file sessions. Concrete consumers need to sublass 19 // from realtime or file sessions. Concrete consumers need to subclass
20 // a specialization of this class and override the ProcessEvent and/or 20 // a specialization of this class and override the ProcessEvent and/or
21 // the ProcessBuffer methods to implement the event consumption logic. 21 // the ProcessBuffer methods to implement the event consumption logic.
22 // Usage might look like: 22 // Usage might look like:
23 // class MyConsumer: public EtwTraceConsumerBase<MyConsumer, 1> { 23 // class MyConsumer: public EtwTraceConsumerBase<MyConsumer, 1> {
24 // protected: 24 // protected:
25 // static VOID WINAPI ProcessEvent(PEVENT_TRACE event); 25 // static VOID WINAPI ProcessEvent(PEVENT_TRACE event);
26 // }; 26 // };
27 // 27 //
28 // MyConsumer consumer; 28 // MyConsumer consumer;
29 // consumer.OpenFileSession(file_path); 29 // consumer.OpenFileSession(file_path);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 trace_handles_.clear(); 140 trace_handles_.clear();
141 141
142 return hr; 142 return hr;
143 } 143 }
144 144
145 } // namespace win 145 } // namespace win
146 } // namespace base 146 } // namespace base
147 147
148 #endif // BASE_WIN_EVENT_TRACE_CONSUMER_H_ 148 #endif // BASE_WIN_EVENT_TRACE_CONSUMER_H_
OLDNEW
« no previous file with comments | « no previous file | base/win/event_trace_consumer_unittest.cc » ('j') | content/browser/tracing/tracing_controller_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698