Native profiling for CPU hotspots, UI hangs, memory issues. iOS via xctrace; Android via Perfetto. Use when diagnosing native-level performance issues.
1. Tools native-profiler-start — start profiling on a booted device. iOS: xctrace recording for CPU, hangs, and leaks. native-profiler-stop — stop the profiler and export trace data to timestamped XML files. native-profiler-analyze — parse exported trace data and return a structured bottleneck payload. profiler-stack-query — drill into parsed data: hang stacks, function callers, thread breakdown, leak details. profiler-load — list and reload previous trace sessions from disk for re-investigation. 2. Platform Support iOS: Backend: Xcode Instruments via xctrace on a booted simulator or connected device. Requires Xcode command-line tools on PATH. Surfaces CPU hotspots, UI hangs, and memory leaks (instruments Leaks table). Android: Backend: Perfetto via adb shell perfetto + an in-process WASM trace-processor engine. Surfaces CPU hotspots and UI hangs, with per-hang jank reason codes, a main-thread state breakdown with blocked_function attribution, and a GC overlap annotation. Also reports an RSS-growth signal for memory pressure; treat it as a hint to confirm manually, not a confirmed leak. The target app must be debuggable or include <profileable android:shell="true"/> in its manifest for perf_sample callstacks to be captured. 3. Investigation Patterns
don't have the plugin yet? install it then click "run inline in claude" again.