Skip to content

Configuration

trace_processor Binary

perfetto-cli uses the trace_processor binary from the Perfetto SDK to parse trace files. By default, it's bundled with the perfetto Python package.

Custom Path

Override the binary path with --tp-path:

perfetto-cli --tp-path /usr/local/bin/trace_processor_shell -t trace.perfetto-trace -p com.app frame jank

Environment Variable

You can also set the path via environment variable:

export PERFETTO_TP_PATH=/usr/local/bin/trace_processor_shell

ADB Configuration

The trace commands require adb to communicate with Android devices.

Multiple Devices

If multiple devices are connected, specify the target device:

export ANDROID_SERIAL=<device-serial>
perfetto-cli trace start

Wireless Debugging

adb connect <device-ip>:5555
perfetto-cli trace start

Default Options

There is no config file for default options. Use shell aliases for common patterns:

alias pf='perfetto-cli -t trace.perfetto-trace -p com.example.app'
pf anr detect
pf frame jank
pf cpu utilization