Revert "[ui][display] Add vsync trace counter"
This reverts commit 6d765e6c565d838979b2d4b49ac8efb9ab2ccc0d.
Reason for revert: possible culprit for go/bbid/8721105604097317713 and other like failures in Bug: 401053604
Original change's description:
> [ui][display] Add vsync trace counter
>
> This CL adds a trace counter that swithes between 0 and 1 to visualize
> vsync cycles in the trace viewer.
>
> Bug: 401279271
> Change-Id: I93623e5c815d674c3a5c1140cdd368840292018c
> Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1222184
> Reviewed-by: Yilong Li <liyl@google.com>
> Reviewed-by: Fadi Meawad <fmeawad@google.com>
> Fuchsia-Auto-Submit: Emircan Uysaler <emircan@google.com>
> Commit-Queue: Emircan Uysaler <emircan@google.com>
Bug: 401279271
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: If1591566dd3fc325ece972c77057507db69c2bba
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1222445
Commit-Queue: Ina Huh <ihuh@google.com>
Reviewed-by: RubberStamper 🤖 <android-build-ayeaye@system.gserviceaccount.com>
diff --git a/src/graphics/display/drivers/coordinator/controller.cc b/src/graphics/display/drivers/coordinator/controller.cc
index feb2b37..f74c6bc 100644
--- a/src/graphics/display/drivers/coordinator/controller.cc
+++ b/src/graphics/display/drivers/coordinator/controller.cc
@@ -288,11 +288,9 @@
void Controller::DisplayEngineListenerOnDisplayVsync(uint64_t banjo_display_id,
zx_time_t banjo_timestamp,
const config_stamp_t* banjo_config_stamp_ptr) {
- // Emit a counter called "VSYNC" for visualization in the Trace Viewer. `vsync_edge_flag`
- // switching between 0 and 1 counts represents one vsync period.
- static bool vsync_edge_flag = false;
- TRACE_COUNTER("gfx", "VSYNC", banjo_display_id, "",
- TA_UINT32(vsync_edge_flag = !vsync_edge_flag));
+ // Emit an event called "VSYNC", which is by convention the event
+ // that Trace Viewer looks for in its "Highlight VSync" feature.
+ TRACE_INSTANT("gfx", "VSYNC", TRACE_SCOPE_THREAD, "display_id", banjo_display_id);
TRACE_DURATION("gfx", "Display::Controller::OnDisplayVsync", "display_id", banjo_display_id);
const display::DisplayId display_id(banjo_display_id);