ComingUp
Xtrace – Unix-Style macOS Profiling for Instruments (CPU/GPU/Memory)

Xtrace – Unix-Style macOS Profiling for Instruments (CPU/GPU/Memory)

Apr 25, 2026 Developer Tools
macos performance profiling

Gallery

Xtrace – Unix-Style macOS Profiling for Instruments (CPU/GPU/Memory)

About

I built this because I wanted a terminal-first profiling workflow on macOS, without constantly switching into the Instruments GUI.What it does today:- CPU analysis: summary, timeline, calltree, collapsed stacks, flamegraph, diff- GPU analysis (trace-gpu.py): active/idle ratios, command-buffer cadence, process ownership- Memory analysis (trace-memory.py): summary, leaks, growth, heap/regions- Recording modes: launch, attach by PID/name, wait-for spawn, system-wide- Root-aware attach flow for protected/root-owned processes- JSON output for automation/LLM workflows (I use it in autoresearch loops: hypothesis → experiment → keep/discard)Other notes:- macOS only (Instruments/xctrace)- core analysis is Python stdlib (no pip deps)- optional tools: speedscope + inferno for best visualizationWould love feedback on workflow, rough edges, and what integrations would make this more useful.

Comments (0)

No comments yet. Be the first to comment!