profiler-stack-query
Query native profiler trace data to investigate native performance issues: hang stacks, thread CPU breakdown, and memory leaks.
Instructions
Query native profiler trace data for iterative investigation of native performance. Requires native-profiler-stop → native-profiler-analyze to have been called first. Modes:
hang_stacks: Full CPU context during a specific hang (by hang_index).
function_callers: Who calls a specific native function and what it calls.
thread_breakdown: CPU time split by thread, optionally filtered.
leak_stacks: Memory leak details (iOS only), optionally filtered by object_type. Use when drilling into native hang stacks, thread CPU breakdown, or memory leaks after native-profiler-analyze. Returns a markdown report with native call stacks, thread weights, or leak details for the selected mode. Fails if native-profiler-analyze has not been run or no parsed trace data is in memory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Query mode: hang_stacks (full CPU context during a hang), function_callers (who calls a native function), thread_breakdown (CPU split by thread), leak_stacks (leak details by object type) | |
| top_n | No | Max results to return (default 15) | |
| thread | No | Thread filter. thread_breakdown: case-insensitive substring match. function_callers: exact raw thread name (e.g. ".blueskyweb.app"), or "main" for the UI thread; omit to search ALL threads (each result is tagged with its thread). Run thread_breakdown first to see the exact raw names. | |
| device_id | Yes | iOS Simulator UDID or Android serial. | |
| hang_index | No | 0-based index into the hang list for hang_stacks mode | |
| object_type | No | Object type filter for leak_stacks mode | |
| function_name | No | Function name for function_callers mode |