ui: HDE: bidirectional Object↔Flamegraph navigation
Object view: surface the flamegraph as a per-path action. Each of the
two retention-path sections — "Shortest Path from GC Root" and
"Dominator Tree Path" — gets a "View in Flamegraph" button next to its
title. The button on the shortest-path section opens the flamegraph
with the "Object Size" metric pivoted at the object's BFS-tree node;
the dominator-path button opens "Dominated Object Size" pivoted at the
object's dominator-tree node. The user already chose the path type
implicitly by being in that section, so each button maps to the metric
whose tree the path_hash was resolved against — no metric selector to
reach for.
Plumbing:
* `Section` widget gains an optional `actions: m.Children` rendered
to the right of the title; clicks on the actions area are isolated
from the toggle so an action click doesn't collapse the section.
* `HeapDumpExplorerSession.openFlamegraphPivotedAt(pathHash, label,
isDominator)` (arrow property, passed by reference into Mithril
attrs) directly seeds the session's flamegraph panel state with
the right metric and a PIVOT view, then navigates to the flamegraph
tab. No "pending" state, no consume callback, no one-shot latch.
* The button handler in `object_view` queries the object's
path_hash_stable from the corresponding stdlib table, then calls
`openFlamegraphPivotedAt` (passed in as an attr).
PIVOT match: path_hash_stable moves from the aggregatable to the
unaggregatable property set on every metric (and is CAST to TEXT in
SQL — the stdlib emits INT64, but the flamegraph reads unaggregatable
columns as STR_NULL). That puts it in `matchingColumns` so the PIVOT
regex can target a specific node by its hash.
Chip text: the PIVOT view's `displayLabel` reads "<Class> (this
instance)". The "(this instance)" suffix tells the user this filter
is path-specific, not class-based — typing a plain class name would
produce a different (class-wide) PIVOT.
Together with the previous commit's "Show objects from this class"
node action — which carries path_hash_stable into the flamegraph-
objects tab — this lets a user round-trip between an individual
object and either of its paths in the flamegraph (and vice versa)
without leaving the Heap Dump Explorer. Both sides are keyed by the
active dump's (upid, ts).
Includes Playwright e2e coverage in
ui/src/test/heap_dump_explorer_flamegraph.test.ts: each button drives
the correct metric and a PIVOT chip; re-clicking the same button
re-applies the pivot (regression coverage).
Change-Id: Ibb72dbcfa29e859318fbfa41653efa79104e8371
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.