Skip to content

Add flutter frame identifier to timeline events on UI and Raster threads #80735

@kenzieschmoll

Description

@kenzieschmoll

In DevTools, we need a way to connect Flutter.Frame events (sent here) to their corresponding timeline events on the UI and Raster threads. This is a requirement in order to make the DevTools timeline show live frame data.

We cannot connect a Flutter.Frame event to its corresponding timeline events by timestamp because the two data sources use different clocks. From @iskakaushik:

Based on some initial observations, there doesn't seem to be an easy way to convert between Dart Timeline and Flutter Clocks. For example, on iOS, Dart timeline seems to use "mach_absolute_time" which doesn't increment when the system is asleep, whereas in Flutter we use "std::chrono::steady_clock()" which is independent of the system uptime.

If we could add metadata to the root UI thread and root Raster thread event that would allow us to associate those two timeline events with a Flutter.Frame event, that would work. Perhaps adding an arg "frameNumber" that matches the "number" field from Flutter.Frame events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions