Commit cb07556f authored by Stephen Nusko's avatar Stephen Nusko Committed by Commit Bot

tracing: Replace uses of TRACE_EVENT_ASYNC* in ui/latency

The deprecated TRACE_EVENT_ASYNC* macros have been superseded by
TRACE_EVENT_NESTABLE_ASYNC*.

Updating to the new macros is mostly straight-forward, except in cases
where STEP_INTO/PAST macros were used extensively (ui/latancy doesn't
appear to use any): In those cases, the steps have been converted into
nested sub-events.

Bug: 1038710
Change-Id: Ic9d0c503aff5b0111c958e90c8fee7c7fb075fdc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2014503Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
Commit-Queue: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Stephen Nusko <nuskos@chromium.org>
Auto-Submit: Stephen Nusko <nuskos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734037}
parent ae4e8f8f
......@@ -841,6 +841,11 @@
INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY)
#define TRACE_EVENT_COPY_NESTABLE_ASYNC_END1(category_group, name, id, \
arg1_name, arg1_val) \
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
category_group, name, id, \
TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
// Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2
// associated arguments. If the category is not enabled, then this
......
......@@ -259,11 +259,9 @@ void LatencyInfo::AddLatencyNumberWithTimestampImpl(
trace_name_ = std::string("InputLatency::") + trace_name_str;
}
TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0(
kTraceCategoriesForAsyncEvents,
trace_name_.c_str(),
TRACE_ID_DONT_MANGLE(trace_id_),
ts);
TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0(
kTraceCategoriesForAsyncEvents, trace_name_.c_str(),
TRACE_ID_GLOBAL(trace_id_), ts);
}
TRACE_EVENT_WITH_FLOW1("input,benchmark",
......@@ -290,9 +288,9 @@ void LatencyInfo::Terminate() {
terminated_ = true;
if (*g_latency_info_enabled.Get().latency_info_enabled) {
TRACE_EVENT_COPY_ASYNC_END1(
TRACE_EVENT_COPY_NESTABLE_ASYNC_END1(
kTraceCategoriesForAsyncEvents, trace_name_.c_str(),
TRACE_ID_DONT_MANGLE(trace_id_), "data", AsTraceableData());
TRACE_ID_GLOBAL(trace_id_), "data", AsTraceableData());
}
TRACE_EVENT_WITH_FLOW0("input,benchmark", "LatencyInfo.Flow",
......
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