All posts

Perfetto v57

We're excited to share Perfetto v57.1! This release introduces an installable AI skill that teaches coding agents how to use Perfetto, a long-awaited fix for overlapping events in JSON traces (commonly affecting the PyTorch profiler), state tracks, a brand-new track type alongside slices and counters, end-to-end support for systemd journald logs, a rework of the query results grid, and new SDK capabilities like nested tracks and correlation ids.

Note: v57.0 was never released due to an issue with the install of the newly introduced AI skill. v57.1 includes a fix for this issue.

🤖 An AI skill for Perfetto

Perfetto now ships an AI skill that teaches coding agents how to record, query, and analyze traces, including guided workflows for common investigations. It works with any Agent Skills-compatible agent (Claude Code, OpenAI Codex, Gemini CLI, OpenCode, and others) and bundles a working trace_processor for the agent to use:

# Claude Code /plugin marketplace add google/perfetto@ai-agents # Codex codex plugin marketplace add google/perfetto --ref ai-agents # Other agents curl -fsSL https://get.perfetto.dev/agents-install | python3 - --agent <opencode|antigravity|pi>

See the Using AI with Perfetto docs for agent-specific install paths and what the skill can do.

🧩 Overlapping events in JSON traces now work

Perfetto now imports overlapping "ph": "X" (complete) events in JSON (Chrome Trace Event Format) traces instead of silently dropping them. This was a long-standing pain point (#4280) for tools which emit overlapping synchronous events, notably traces from the PyTorch profiler: the affected slices vanished from both the timeline and SQL, and some users were resorting to self-hosting old versions of the UI. Overlapping events are now ingested onto overflow tracks which the UI merges back into a single thread track, so everything is visible in the timeline and queryable in SQL.

overlapping JSON events rendering in the timeline

Note that overlapping "X" events remain outside the Trace Event Format spec: the importer records stats naming the offending events (surfaced in the UI's import warnings) so you can flag them to your tracing tool's maintainers. If you maintain such a tool, prefer async ("b"/"e") events, which is how the format natively represents genuinely overlapping intervals.

🚦 State tracks

Slices and counters have a new sibling: state tracks, a first-class way to record the state of a system or subsystem over time (e.g. "Buffering", "Playing", "Paused"). A state track always has exactly one current value; each event simply transitions it to a new state, and clearing it marks the track as idle.

state_tracks

You can emit states from all the SDKs:

// C++ SDK perfetto::StateTrack track("Player state"); TRACE_STATE("player", "Buffering", track);
// C SDK (high-level API) PERFETTO_TE(player, PERFETTO_TE_STATE("Buffering"), PERFETTO_TE_REGISTERED_TRACK(&player_state_track));

The Android Java SDK gets the same capability. Trace Processor ingests state events into a new state SQL table, and the UI renders state tracks natively with a dedicated details panel.

📜 systemd journald logs

Linux system logs can now be captured as part of a trace, end to end:

journald

Big thanks to @staticfloat for contributing this feature!

🖥️ UI

The query results grid got a big upgrade: columns can be sorted, reordered, and hidden, the sidebar is collapsible, and SQL errors are now surfaced properly in the grid.

query_grid

🧰 SDK

🔬 Profiling

heapprofd's process_cmdline now supports partial wildcard matching (e.g. system_* or /system/bin/*), with the same semantics as the perf profiling and Java heap dump data sources. Wildcards only match already-running processes, so configs using them must set no_startup = true.

🧠 Trace Processor

trace_processor query "https://ui.perfetto.dev/#!/?s=<hash>" "select count(*) from slice"

⚙️ Tracing service & probes

🛠️ v57.1 patch fixes

Happy Tracing!


A huge thanks to everyone, both inside and outside of Google, who contributed to making Perfetto v57 a success. ♥️

New Contributors

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

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

Full Changelog: https://github.com/google/perfetto/compare/v56.1...v57.1