Commit f3b33a18 authored by Etienne Bergeron's avatar Etienne Bergeron Committed by Commit Bot

Move trace events for CPU sampling to a debug

The CPU sampling profiler trace events were added on windows to
investigate some strange patterns happening in the field. We have enough
data to make some analysis over it.

There are plan to add sampling profiler to renderers, io-thread and so on.
This will increase the amount of trace events in a trace and it's better
to avoid producing events that are not needed.

We are moving these trace events to a debug category. This will allow us
to make a specific slow-reports scenario if we still want to analyze the
sampling profiler and it's behavior.

R=wittman@chromium.org

Change-Id: If348399336e60c4aa511ea783aec4c92d0575462
Reviewed-on: https://chromium-review.googlesource.com/c/1340908Reviewed-by: default avataroysteine <oysteine@chromium.org>
Reviewed-by: default avatarMike Wittman <wittman@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609404}
parent 523cf50a
......@@ -355,7 +355,8 @@ NativeStackSamplerError SuspendThreadAndRecordStack(
uintptr_t bottom = 0u;
{
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler"), "SuspendThread");
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug"),
"SuspendThread");
{
ScopedSuspendThread suspend_thread(thread_handle);
......@@ -393,7 +394,8 @@ NativeStackSamplerError SuspendThreadAndRecordStack(
test_delegate->OnPreStackWalk();
{
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler"), "RecordStack");
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug"),
"RecordStack");
RewritePointersToStackMemory(top, bottom, &thread_context,
stack_copy_buffer);
......@@ -452,7 +454,7 @@ void NativeStackSamplerWin::ProfileRecordingStarting() {
std::vector<Frame> NativeStackSamplerWin::RecordStackFrames(
StackBuffer* stack_buffer,
ProfileBuilder* profile_builder) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler"),
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug"),
"NativeStackSamplerWin::RecordStackFrames");
DCHECK(stack_buffer);
......@@ -476,7 +478,7 @@ std::vector<Frame> NativeStackSamplerWin::RecordStackFrames(
std::vector<Frame> NativeStackSamplerWin::CreateFrames(
const std::vector<RecordedFrame>& stack) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler"),
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug"),
"NativeStackSamplerWin::CreateFrames");
std::vector<Frame> frames;
......
......@@ -161,6 +161,7 @@
X(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.frames")) \
X(TRACE_DISABLED_BY_DEFAULT("cc.debug.scheduler.now")) \
X(TRACE_DISABLED_BY_DEFAULT("cpu_profiler")) \
X(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug")) \
X(TRACE_DISABLED_BY_DEFAULT("devtools.screenshot")) \
X(TRACE_DISABLED_BY_DEFAULT("devtools.timeline")) \
X(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.frame")) \
......
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