ui: Heap Dump Explorer flamegraph diff with pprof-style coloring Add baseline / diff mode to the Heap Dump Explorer. Load a second trace (or pick a second dump from the same trace) as a baseline and compare it against the current dump across every tab: - Overview diff, and a Flamegraph diff coloured pprof-style on the signed, normalised delta (green = smaller, grey = unchanged, red = larger; absolute or relative basis per metric) with a matching legend. - Diff grids for Classes, Objects, Dominators, Bitmaps, Strings and Arrays, plus a per-object diff view. - A top-bar RadioGroup toggles Diff / Current / Baseline. Same-trace diffs run as a single SQL JOIN against android_heap_graph_*; cross-trace diffs pair objects in JS across the two trace_processor engines (NUL-free dense path ids, so the keys are portable to the native engine) and write the paired rows back into the current engine. Pooled baseline engines are torn down via the trace's trash on close. Rebased onto current upstream/main, which moved the explorer onto a store-backed session with a persisted_state permalink model after this work was first written. The diff state is re-ported onto that model: object tabs serialize their (currentId, baselineId) pair, the page keeps a content-keyed tab map plus an (engine, filter)-keyed overview cache for the baseline and current sides, and all page-level caches reset per trace load. Adds a persisted_state round-trip unit test and fixes stale mode-toggle selectors in the e2e tests (the widget is a RadioGroup, not SegmentedButtons).
Perfetto is an open-source suite of SDKs, daemons and tools which use tracing to help developers understand the behaviour of complex systems and root-cause functional and performance issues on client and embedded systems.
It is a production-grade tool that is the default tracing system for the Android operating system and the Chromium browser.
Perfetto is not a single tool, but a collection of components that work together:
Perfetto was designed to be a versatile and powerful tracing system for a wide range of use cases.
ftrace, allowing you to visualize scheduling, syscalls, interrupts, and custom kernel tracepoints on a timeline.chrome://tracing. Use it to debug and root-cause issues in the browser, V8, and Blink.We‘ve designed our documentation to guide you to the right information as quickly as possible, whether you’re a newcomer to performance analysis or an experienced developer.
New to tracing? If you're unfamiliar with concepts like tracing and profiling, start here:
Ready to dive in? Our “Getting Started” guide is the main entry point for all users. It will help you find the right tutorials and documentation for your specific needs:
Want the full overview? For a comprehensive look at what Perfetto is, why it's useful, and who uses it, see our main documentation page:
For users interested in the Debian distribution of Perfetto, the official source of truth and packaging efforts are maintained at Debian Perfetto Salsa Repository
Have questions? Need help?
We follow Google's Open Source Community Guidelines.