From b160f971d22abe452efc8d9671ee7edbf26b38c8 Mon Sep 17 00:00:00 2001 From: Felipe Archondo Date: Tue, 22 Sep 2020 16:02:49 -0400 Subject: [PATCH] [fuchsia] add frames_in_flight info to trace events (#21302) No tests needed, since there is no change in functionality expected. --- shell/platform/fuchsia/flutter/session_connection.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell/platform/fuchsia/flutter/session_connection.cc b/shell/platform/fuchsia/flutter/session_connection.cc index c677d42fbc5..16d832d1201 100644 --- a/shell/platform/fuchsia/flutter/session_connection.cc +++ b/shell/platform/fuchsia/flutter/session_connection.cc @@ -38,6 +38,9 @@ SessionConnection::SessionConnection( // A frame was presented: Update our |frames_in_flight| to match the // updated unfinalized present requests. frames_in_flight_ -= num_presents_handled; + TRACE_EVENT2("gfx", "OnFramePresentedFelipe", "frames_in_flight", + frames_in_flight_, "max_frames_in_flight", + kMaxFramesInFlight); FML_DCHECK(frames_in_flight_ >= 0); VsyncRecorder::GetInstance().UpdateFramePresentedInfo( @@ -78,7 +81,8 @@ SessionConnection::SessionConnection( SessionConnection::~SessionConnection() = default; void SessionConnection::Present() { - TRACE_EVENT0("gfx", "SessionConnection::Present"); + TRACE_EVENT2("gfx", "SessionConnection::Present", "frames_in_flight", + frames_in_flight_, "max_frames_in_flight", kMaxFramesInFlight); TRACE_FLOW_BEGIN("gfx", "SessionConnection::PresentSession", next_present_session_trace_id_);