Commit a8300e56 by Courtney Goeltzenleuchter Committed by Commit Bot

Fix scoped trace events

The macro was introducing an additional scope that was not the scope we intend to trace. Test: ./external/chromium-trace/systrace.py -t 10 -o /tmp/maps.html -a com.google.android.apps.maps gfx sched freq idle am wm gfx view sync irq binder_driver Examine trace for markers and verify they are expected size. Bug: angleproject:3176 Change-Id: I593b8685c5e72a844bebec4b98e1373110a235ad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1492012 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@google.com>
parent 912ac85b
...@@ -462,20 +462,16 @@ ...@@ -462,20 +462,16 @@
// Implementation detail: internal macro to create static category and add begin // Implementation detail: internal macro to create static category and add begin
// event if the category is enabled. Also adds the end event when the scope // event if the category is enabled. Also adds the end event when the scope
// ends. // ends.
#define INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, ...) \ #define INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, ...) \
do \ INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \
{ \ gl::TraceEvent::TraceEndOnScopeClose INTERNALTRACEEVENTUID(profileScope); \
INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \ if (*INTERNALTRACEEVENTUID(catstatic)) \
gl::TraceEvent::TraceEndOnScopeClose INTERNALTRACEEVENTUID(profileScope); \ { \
if (*INTERNALTRACEEVENTUID(catstatic)) \ gl::TraceEvent::addTraceEvent(TRACE_EVENT_PHASE_BEGIN, INTERNALTRACEEVENTUID(catstatic), \
{ \ name, gl::TraceEvent::noEventId, TRACE_EVENT_FLAG_NONE, \
gl::TraceEvent::addTraceEvent( \ ##__VA_ARGS__); \
TRACE_EVENT_PHASE_BEGIN, INTERNALTRACEEVENTUID(catstatic), name, \ INTERNALTRACEEVENTUID(profileScope).initialize(INTERNALTRACEEVENTUID(catstatic), name); \
gl::TraceEvent::noEventId, TRACE_EVENT_FLAG_NONE, ##__VA_ARGS__); \ }
INTERNALTRACEEVENTUID(profileScope) \
.initialize(INTERNALTRACEEVENTUID(catstatic), name); \
} \
} while (0)
// Implementation detail: internal macro to create static category and add // Implementation detail: internal macro to create static category and add
// event if the category is enabled. // event if the category is enabled.
......
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