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

Side by Side Diff: base/win/event_trace_controller.cc

Issue 4517004: Move Windows-specific Event Tracing for Windows implementation to base/win. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixed another ETW user in Chrome Frame Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « base/win/event_trace_controller.h ('k') | base/win/event_trace_controller_unittest.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // Implementation of a Windows event trace controller class. 5 // Implementation of a Windows event trace controller class.
6 #include "base/event_trace_controller_win.h" 6 #include "base/win/event_trace_controller.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace base {
10 namespace win {
11
9 EtwTraceProperties::EtwTraceProperties() { 12 EtwTraceProperties::EtwTraceProperties() {
10 memset(buffer_, 0, sizeof(buffer_)); 13 memset(buffer_, 0, sizeof(buffer_));
11 EVENT_TRACE_PROPERTIES* prop = get(); 14 EVENT_TRACE_PROPERTIES* prop = get();
12 15
13 prop->Wnode.BufferSize = sizeof(buffer_); 16 prop->Wnode.BufferSize = sizeof(buffer_);
14 prop->Wnode.Flags = WNODE_FLAG_TRACED_GUID; 17 prop->Wnode.Flags = WNODE_FLAG_TRACED_GUID;
15 prop->LoggerNameOffset = sizeof(EVENT_TRACE_PROPERTIES); 18 prop->LoggerNameOffset = sizeof(EVENT_TRACE_PROPERTIES);
16 prop->LogFileNameOffset = sizeof(EVENT_TRACE_PROPERTIES) + 19 prop->LogFileNameOffset = sizeof(EVENT_TRACE_PROPERTIES) +
17 sizeof(wchar_t) * kMaxStringLen; 20 sizeof(wchar_t) * kMaxStringLen;
18 } 21 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return HRESULT_FROM_WIN32(err); 161 return HRESULT_FROM_WIN32(err);
159 } 162 }
160 163
161 HRESULT EtwTraceController::Flush(const wchar_t* session_name, 164 HRESULT EtwTraceController::Flush(const wchar_t* session_name,
162 EtwTraceProperties* properties) { 165 EtwTraceProperties* properties) {
163 DCHECK(properties != NULL); 166 DCHECK(properties != NULL);
164 ULONG err = ::ControlTrace(NULL, session_name, properties->get(), 167 ULONG err = ::ControlTrace(NULL, session_name, properties->get(),
165 EVENT_TRACE_CONTROL_FLUSH); 168 EVENT_TRACE_CONTROL_FLUSH);
166 return HRESULT_FROM_WIN32(err); 169 return HRESULT_FROM_WIN32(err);
167 } 170 }
171
172 } // namespace win
173 } // namespace base
OLDNEW
« no previous file with comments | « base/win/event_trace_controller.h ('k') | base/win/event_trace_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698