Commit bc060569 authored by Meredith Lane's avatar Meredith Lane Committed by Commit Bot

Revert "Hooking up buffer_size in EtwTraceController::StartRealtimeSession"

This reverts commit 1d6d5027.

Reason for revert: Suspected culprit of win-asan failure: https://ci.chromium.org/p/chromium/builders/ci/win-asan/15420

Original change's description:
> Hooking up buffer_size in EtwTraceController::StartRealtimeSession
>
> I am working on some ETW stuff for Chrome Remote Desktop and I
> noticed that this parameter is unused and a default value of 16KB
> is always used.  This isn't a big deal as the only caller appears
> to be its unit tests but it seemed like the value passed in
> should do something.  The other approach would be to remove the
> param but adjusting the buffer size seems like a reasonable thing
> to expose (assuming the param is actually used).
>
> Change-Id: I453ac2417d68f6c16fecd517cf1cd74c5aa15731
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2511290
> Commit-Queue: Joe Downing <joedow@google.com>
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#823240}

TBR=brucedawson@chromium.org,joedow@chromium.org

Change-Id: Iab1337eaf4c762f50074d56d8d7eaa0210fb7d0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2515503Reviewed-by: default avatarMeredith Lane <meredithl@chromium.org>
Commit-Queue: Meredith Lane <meredithl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823406}
parent 399d9e34
......@@ -6,8 +6,6 @@
#include "base/win/event_trace_controller.h"
#include "base/check.h"
constexpr size_t kDefaultRealtimeBufferSizeKb = 16;
namespace base {
namespace win {
......@@ -83,12 +81,11 @@ HRESULT EtwTraceController::StartFileSession(const wchar_t* session_name,
HRESULT EtwTraceController::StartRealtimeSession(const wchar_t* session_name,
size_t buffer_size) {
DCHECK(NULL == session_ && session_name_.empty());
EtwTraceProperties prop;
EVENT_TRACE_PROPERTIES& p = *prop.get();
p.LogFileMode = EVENT_TRACE_REAL_TIME_MODE | EVENT_TRACE_USE_PAGED_MEMORY;
p.FlushTimer = 1; // flush every second.
p.BufferSize = buffer_size ? buffer_size : kDefaultRealtimeBufferSizeKb;
p.BufferSize = 16; // 16 K buffers.
p.LogFileNameOffset = 0;
return Start(session_name, &prop);
}
......
......@@ -98,8 +98,7 @@ class BASE_EXPORT EtwTraceController {
const wchar_t* logfile_path,
bool realtime = false);
// Starts a realtime session with some default properties. |buffer_size| is
// in KB. A default value for |buffer_size| is used if 0 is passed in.
// Starts a realtime session with some default properties.
HRESULT StartRealtimeSession(const wchar_t* session_name, size_t buffer_size);
// Enables "provider" at "level" for this session.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment