native-profiler-start
Start native profiling on a booted device to capture CPU, hang, and memory data from a running app. Automatically detects the app process unless specified.
Instructions
Start native profiling on a booted device. iOS: Instruments via xctrace (CPU, hangs, memory). Android: Perfetto (CPU, jank, RSS-growth weak signal). Auto-detects the running app process unless app_process is explicitly provided. After starting, let the user interact with the app, then call native-profiler-stop. Use when you want to capture native CPU, hang, and memory data for a running app. Returns { status, pid, traceFile } confirming the recording has started. Fails if no app is running on the device, or the profiler cannot attach to the process.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | Target device id from `list-devices` (iOS UDID or Android serial). | |
| app_process | No | iOS: the CFBundleExecutable or display name of the app to profile. Android: the app's package name. If omitted, auto-detects the currently running foreground app. Only provide this if auto-detection picks the wrong app. | |
| template_path | No | iOS-only: path to an Instruments .tracetemplate file (defaults to bundled Argent template). Ignored on Android. |