All posts

Perfetto v59

Weโ€™re excited to share Perfetto v59.1! This release brings traces that survive device reboots on Android, a much friendlier Trace Processor command line (rustc-style SQL errors, markdown output and a dedicated agent mode for AI coding tools), flamegraphs as call trees and function tables, sampled callstacks over time, a new linux.smaps data source, and a long list of UI, SQL standard library and SDK improvements.

Note: v59.0 was never released due to a build issue on the Linux and Android release builders. v59.1 contains the same changes plus the build fix.

๐Ÿ” Persistent traces across reboots (Android)

Set TraceConfig.persist_trace_across_reboots and the trace file is kept on disk if the device reboots mid-trace, then recovered and uploaded on the next boot via perfetto --upload-after-reboot. Recovered traces record why in the new trace_recovery_reason metadata entry.

๐Ÿ”ฅ New ways to look at profiles in the UI

Flamegraphs are great for spotting where cost goes, but they're only one way to read a profile. v59 adds two new views over the same data, plus a way to see how stacks change over time.

callstack-flamechart

Sampled callstacks over time: the new Callstack flamechart track under surfaceflinger's main thread, with the flamegraph for an area selection and the new Flamegraph / Call Tree / Functions tabs below.

call-tree-view

Call Tree view (top-down, fully expanded) for the same selection: total and self CPU time for every frame.

functions-view

Functions view: self and total CPU time per function, summed over every call path.

๐Ÿ•ธ๏ธ Flows that scale to dense graphs

Selecting a slice in a trace with a dense flow graph (build system dependency traces are a common example) used to make the UI follow the entire flow chain, which could grind it to a halt. Many people have hit this over time (#1004).

๐Ÿ’ป A friendlier Trace Processor CLI

trace-processor-cli

Trace Processor CLI: a rustc-style error for a misspelled column, then query results printed as a markdown table with --format markdown.

Learn more about agent mode

๐Ÿง  Memory: linux.smaps data source

traced_perf can now record /proc/pid/smaps for selected processes, once or periodically. Processes can be selected by cmdline and uid range. The record page can also capture smaps snapshots alongside ART heap dumps.

๐Ÿ” Symbolization without local binaries

Native profiles from Linux machines often arrive without the unstripped binaries needed to symbolize them. Trace Processor can now fetch debug files from debuginfod servers by build ID, so trace_processor bundle --debuginfod input.pftrace output.tar produces a symbolized bundle with no local binaries at all.

Learn more about symbolization

๐Ÿ Python: connect to warm sessions

TraceProcessor(remote='my-session') connects to a running trace_processor server unix session, so you can parse a large trace once and query it from many scripts. Only query() is supported over Unix sockets for now. remote also accepts HTTP addresses, and addr is deprecated in its favour.

๐Ÿ–ฅ๏ธ UI Enhancements

โšก Trace Processor & SQL standard library

๐Ÿš‚ Tracing Service and Probes

๐Ÿงฉ SDK improvements

๐Ÿ”ง Build

โš ๏ธ Migration and compatibility notes

Perfetto v59 includes a few changes worth checking when upgrading:


A huge thanks to everyone who contributed to making Perfetto v59 possible. A specific thanks to our first time contributors:

For complete details, see the v59.1 changelog or view all changes on GitHub.

Download Perfetto v59.1 from our releases page, get started at perfetto.dev, or try the UI directly at ui.perfetto.dev.