Skip to content

Perfetto Tracing (to tracing daemon instead of file) #170200

Open
@ardera

Description

@ardera

Currently, the flutter devtools are very helpful for profiling & tracing flutter applications. However, sometimes, the information provided by the devtools is not enough to find potential bottlenecks.

Perfetto is a perfect solution to trace the whole system and really see what every process & thread is doing. E.g. there's data producers for process scheduling, syscalls, CPU frequency and DMA fences. The DMA fence tracing is especially useful to see how long rendering actually took on the GPU. Furthermore, there's perfetto integration in mesa to trace raw GPU performance counters and stuff like command buffer submits.

Dart/Flutter even already kinda has some perfetto support, but only for generating one-off trace files, and combining that with other data sources does not really work (leads to broken trace files).

There's also a systrace backend you can enable with --trace-systrace, which writes to /sys/kernel/tracing/trace_marker on linux. However, AFAICT, perfetto is not able to recognize the trace events written there.

So the proposal is: Add a tracing backend to Flutter (/ Dart) that traces to the perfetto system deamon, instead of to files

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: devtoolsDevTools related - suite of performance and debugging toolsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterengineflutter/engine repository. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.team-devexpOwned by the Developer Experience team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions