analyze_perf_output
Parse perf report output to extract top CPU-consuming functions on Arm64, filtering by overhead and sample count.
Instructions
Parse the text output of perf report --stdio and return the top hot symbols.
Use this tool when a user pastes `perf report --stdio` output and wants to know
which functions are consuming the most CPU cycles on their Arm64 system.
Args:
perf_report_text: Raw stdout of `perf report --stdio` or similar.
top_n: Maximum number of hot symbols to return (default 10).
min_overhead_pct: Filter out symbols below this overhead percentage (default 0.5).
Returns:
{
"summary": {"total_samples": int, "total_events": int | None, "command": str | None},
"hot_symbols": [
{"overhead_pct": 12.34, "samples": 1234, "command": "...",
"module": "...", "symbol": "..."},
...
],
"warnings": [...]
}
Example: analyze_perf_output(perf_report_text=text, top_n=5, min_overhead_pct=1.0)
returns the 5 hottest symbols above 1% overhead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| min_overhead_pct | No | ||
| perf_report_text | Yes |