CLI Commands¶
Complete reference for all perfetto-cli commands and options.
Global Options¶
These options apply to all analysis commands:
| Option | Description | Default |
|---|---|---|
-t, --trace <path> |
Trace file path | Required |
-p, --process <name> |
Process name filter | None |
-f, --format <type> |
Output format: text / table / json |
text |
-v, --verbose |
Verbose output | Off |
--tp-path <path> |
Custom trace_processor binary path | Auto |
--version |
Show version and exit | — |
--help |
Show help and exit | — |
anr¶
anr detect¶
Detect ANR events with severity classification.
| Option | Description | Default |
|---|---|---|
--min-duration <ms> |
Minimum ANR duration to report | None |
anr root-cause¶
Multi-signal ANR root cause analysis.
| Option | Description | Default |
|---|---|---|
--anr-timestamp <ms> |
Timestamp of the ANR event | Required |
frame¶
frame jank¶
Detect janky frames with severity classification.
| Option | Description | Default |
|---|---|---|
--threshold <ms> |
Jank threshold in milliseconds | 16 |
frame summary¶
Frame performance summary with rating.
cpu¶
cpu utilization¶
Per-thread CPU utilization breakdown.
| Option | Description | Default |
|---|---|---|
--include-frequency |
Include CPU DVFS frequency info | Off |
cpu hotspots¶
Main thread hotspot slices (top-N by duration).
| Option | Description | Default |
|---|---|---|
--limit <n> |
Maximum hotspot slices to show | 20 |
cpu contention¶
Thread contention analysis.
memory¶
memory leak¶
RSS-based memory leak detection.
| Option | Description | Default |
|---|---|---|
--growth-threshold <MB/min> |
Minimum growth rate to flag | 5 |
memory heap¶
Heap dominator tree analysis.
binder¶
binder profile¶
Binder transaction profiling.
| Option | Description | Default |
|---|---|---|
--min-latency <ms> |
Minimum latency to report | 10 |
--group-by <field> |
Group by: aidl / server / none |
none |
query¶
query sql¶
Execute raw PerfettoSQL query.
| Option | Description |
|---|---|
--query <sql> |
SQL query string |
--file <path> |
Path to SQL file |
query find-slices¶
Search slices by name pattern.
| Option | Description | Default |
|---|---|---|
--pattern <text> |
Search pattern | Required |
--match-type <type> |
contains / exact / glob |
contains |
query slice-info¶
Get slice details by ID.
trace¶
trace start¶
Start device trace capture.
| Option | Description | Default |
|---|---|---|
--duration <time> |
Capture duration | 10s |
--buffer-size <size> |
Ring buffer size | 32mb |
trace stop¶
Stop capture and pull trace file.
trace run¶
One-shot capture (start → wait → stop → pull).
| Option | Description | Default |
|---|---|---|
--duration <time> |
Capture duration | 10s |
-o, --output <dir> |
Output directory | Current dir |
skills¶
skills install¶
Install a skill from source.
skills list¶
List installed skills.
skills uninstall¶
Remove an installed skill.