flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.58k stars 326 forks source link

Mark missed frames in devtools? #2768

Open Hixie opened 3 years ago

Hixie commented 3 years ago

When a frame is still being handled when the next frame comes due, the timeline trace shows a VSyncProcessCallback and an AsyncWaitForVsync and other related entries in the UI thread, without a corresponding "Framework Workload" event. It would be interesting to mark these somehow in the UI as missed frames. For example, maybe whatever GPURasterizer::Draw call was happening when the vsyncs got dropped on the floor could be flagged as having caused N missed frames. Or the vsync callback events could be marked in red to indicate that they are missed frames.

If we do anything like this please either have the engine label these events with clear names or make sure to add a test to the flutter/tests shard that verifies that we reliably send these events with the names that DevTools expects, so that someone doesn't break the output by "cleaning up" some of these events.

kenzieschmoll commented 3 weeks ago

Perhaps this could be solved with an advanced Perfetto query to identify an event pattern signaling dropped frames.