[fuchsia] add frames_in_flight info to trace events (#21302)

No tests needed, since there is no change in functionality expected.
This commit is contained in:
Felipe Archondo 2020-09-22 16:02:49 -04:00 committed by GitHub
parent 6e42b54d59
commit b160f971d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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_);