trace
Records Perfetto system activity for a set duration and saves the file on the host, optionally capturing app-defined sections or a cold-start launch for performance analysis.
Instructions
Records a Perfetto system trace (scheduling, frames, binder, app trace sections) for duration_s and saves it on the host. With package, the app's own Trace sections are recorded; with launch, the app is force-stopped and launched a second into the trace to capture a cold start. Open the file at https://ui.perfetto.dev.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "trace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| launch | No | ||
| package | No | ||
| buffer_mb | No | ||
| categories | No | atrace categories. Default: sched freq idle gfx view wm am input binder_driver dalvik hal res. | |
| duration_s | No |