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

Side by Side Diff: content/browser/tracing/etw_system_event_consumer_win.cc

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/browser/tracing/etw_system_event_consumer_win.h" 5 #include "content/browser/tracing/etw_system_event_consumer_win.h"
6 6
7 #include <stdint.h>
8
7 #include "base/base64.h" 9 #include "base/base64.h"
8 #include "base/json/json_string_value_serializer.h" 10 #include "base/json/json_string_value_serializer.h"
9 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
10 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
11 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
12 #include "base/time/time.h" 14 #include "base/time/time.h"
13 #include "base/trace_event/trace_event_impl.h" 15 #include "base/trace_event/trace_event_impl.h"
14 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
15 17
16 namespace content { 18 namespace content {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 85
84 // Stop the consumer thread. 86 // Stop the consumer thread.
85 thread_.Stop(); 87 thread_.Stop();
86 88
87 // Pass the serialized events. 89 // Pass the serialized events.
88 callback.Run(GetTracingAgentName(), GetTraceEventLabel(), result); 90 callback.Run(GetTracingAgentName(), GetTraceEventLabel(), result);
89 } 91 }
90 92
91 bool EtwSystemEventConsumer::StartKernelSessionTracing() { 93 bool EtwSystemEventConsumer::StartKernelSessionTracing() {
92 // Enabled flags (tracing facilities). 94 // Enabled flags (tracing facilities).
93 uint32 enabled_flags = EVENT_TRACE_FLAG_IMAGE_LOAD | 95 uint32_t enabled_flags = EVENT_TRACE_FLAG_IMAGE_LOAD |
94 EVENT_TRACE_FLAG_PROCESS | 96 EVENT_TRACE_FLAG_PROCESS | EVENT_TRACE_FLAG_THREAD |
95 EVENT_TRACE_FLAG_THREAD | 97 EVENT_TRACE_FLAG_CSWITCH;
96 EVENT_TRACE_FLAG_CSWITCH;
97 98
98 EVENT_TRACE_PROPERTIES& p = *properties_.get(); 99 EVENT_TRACE_PROPERTIES& p = *properties_.get();
99 p.LogFileMode = EVENT_TRACE_REAL_TIME_MODE; 100 p.LogFileMode = EVENT_TRACE_REAL_TIME_MODE;
100 p.FlushTimer = kEtwBufferFlushTimeoutInSeconds; 101 p.FlushTimer = kEtwBufferFlushTimeoutInSeconds;
101 p.BufferSize = kEtwBufferSizeInKBytes; 102 p.BufferSize = kEtwBufferSizeInKBytes;
102 p.LogFileNameOffset = 0; 103 p.LogFileNameOffset = 0;
103 p.EnableFlags = enabled_flags; 104 p.EnableFlags = enabled_flags;
104 p.Wnode.ClientContext = 1; // QPC timer accuracy. 105 p.Wnode.ClientContext = 1; // QPC timer accuracy.
105 106
106 HRESULT hr = base::win::EtwTraceController::Start( 107 HRESULT hr = base::win::EtwTraceController::Start(
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 base::RefCountedString::TakeString(&output); 238 base::RefCountedString::TakeString(&output);
238 BrowserThread::PostTask( 239 BrowserThread::PostTask(
239 BrowserThread::UI, FROM_HERE, 240 BrowserThread::UI, FROM_HERE,
240 base::Bind(&EtwSystemEventConsumer::OnStopSystemTracingDone, 241 base::Bind(&EtwSystemEventConsumer::OnStopSystemTracingDone,
241 base::Unretained(this), 242 base::Unretained(this),
242 callback, 243 callback,
243 result)); 244 result));
244 } 245 }
245 246
246 } // namespace content 247 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/etw_system_event_consumer_win.h ('k') | content/browser/tracing/memory_tracing_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698