ui: Add baseline diffing to the tree explorer; use it in HDE Make flamegraph diffing an opt-in feature of the tree explorer panel, next to its Call Tree and Functions table views, and make the Heap Dump Explorer its first user. Tree explorer: - TreeExplorerPanelAttrs.baseline opts into comparing the panel's tree against a baseline tree, fetched with the same state (metric, filters, view). Hosts without a baseline are unaffected. For now, only trees of the same trace are supported. - buildTreeExplorerDiff pairs the nodes of the two trees by name and grouping properties under paired parents, pprof-style, and lays out their union as one tree. Columns marked profileSpecific (e.g. hashes of ids) are ignored when pairing. - state.comparison chooses what is shown (the diff, or either tree on its own), what diff node widths are proportional to (both trees, or one of them) and what node colors encode (absolute or relative change). - A Diff switch and a Baseline/Current toggle at the right of the tab bar choose between the diff and either tree. A legend and a tune menu control how the diff is drawn. - The flamegraph colors diff nodes from green (shrank) to red (grew). Its tooltips, copied stacks and exports show the baseline and current values and their change, and only the properties which pair nodes, as the others have a value per tree. Host node actions are not offered on nodes only the baseline has. - The Call Tree and Functions tabs show the diff with baseline, change and relative change columns, largest growth first. Heap Dump Explorer: - A "Compare with:" picker on the Flamegraph tab selects a baseline dump of the same trace. It is persisted with the rest of the state. - Heap dump labels include the dump's time, to tell apart the dumps of one process. - The pprof download holds the dump being shown. Merging several profiles is not part of this change.
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.