Analyzes the specified Go pprof file and returns serialized analysis results (e.g., Top N list or flame graph JSON). Supported profile types: cpu, heap, goroutine, allocs, mutex, block. Output formats: text, markdown, json, flamegraph-json.
generate_flamegraph
Uses go tool pprof to generate a flame graph (SVG format) for the specified pprof file, saves it to the specified path, and returns the path and SVG content. Requires Graphviz.
open_interactive_pprof
Launches the go tool pprof interactive web UI in the background for the specified pprof file. macOS only. Returns the PID of the background process.
detect_memory_leaks
Compares two heap profile snapshots to identify potential memory leaks. Analyzes memory growth by object type and allocation site.
disconnect_pprof_session
Terminates a background pprof process previously started by open_interactive_pprof, using its PID.
compare_profiles
Compares two profile files (e.g., baseline vs. target) to identify performance regressions or improvements. Supports all profile types.
analyze_heap_time_series
Analyzes multiple heap profiles over time to identify memory growth trends and potential leaks. Requires at least 3 heap profiles.