Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0df722f5 authored by Kyle Holm's avatar Kyle Holm
Browse files

Add a trace to link inputEventId and vsyncId

We should have an easy way to query in a perfetto trace
for the frame associated with an input event.
This change adds a trace event to do that.

Bug: 363076084
Test:
https://ui.perfetto.dev/#!/?s=039fa15daa0e4cd005587a64962b5a48f7910cec
Verified the new slice has the correct vsyncId and inputEventId.
Flag: EXEMPT log only update

Change-Id: I2d4e5e439076c94b195cbe328b66d0c988e10661
parent 6a7b8d72
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -654,6 +654,9 @@ void CanvasContext::draw(bool solelyTextureViewUpdates) {
        if (vsyncId != UiFrameInfoBuilder::INVALID_VSYNC_ID) {
            const auto inputEventId =
                    static_cast<int32_t>(mCurrentFrameInfo->get(FrameInfoIndex::InputEventId));
            ATRACE_FORMAT(
                "frameTimelineInfo(frameNumber=%llu, vsyncId=%lld, inputEventId=0x%" PRIx32 ")",
                frameCompleteNr, vsyncId, inputEventId);
            const ANativeWindowFrameTimelineInfo ftl = {
                    .frameNumber = frameCompleteNr,
                    .frameTimelineVsyncId = vsyncId,