perf-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PERF_BINARY | No | Path to the perf binary | perf |
| PERF_TIMEOUT | No | Command timeout in seconds (max 300) | 60 |
| PERF_MAX_OUTPUT_BYTES | No | Output truncation limit (bytes) | 2000000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| perf_annotateA | Source/assembly annotation: shows per-line or per-instruction sample percentages inside a specific function. Use this after perf_report to drill into a hot function and see exactly which lines or instructions are consuming time. Key parameters:
Output: source/assembly listing with % annotations per line. Requires: debuginfo packages for source interleaving. Works on any perf.data from perf record. |
| perf_buildid_listA | List the ELF build-id hashes for binaries referenced in perf.data. Use this to verify symbol resolution will work: compare build IDs against installed debuginfo packages. Key parameters:
Output: ' ' per line. Works on any perf.data. |
| perf_c2c_reportA | Cache-to-cache false sharing analysis. Identifies cache lines with the most HITM (Hit Modified) events — the primary indicator of cross-core cache contention. Use this to diagnose multi-threaded performance issues caused by different threads accessing the same cache line. Key parameters:
Output: multi-section report — shared data cache line table, per-cacheline detail with offsets and symbols. Requires: perf record -d -a (with memory data recording). |
| perf_data_convertA | Convert perf.data to JSON or CTF (Common Trace Format). Use this to export data for processing in external tools. Key parameters:
Exactly one of to_json or to_ctf must be specified. Output: returns the output file/directory path. |
| perf_diffA | Compare two perf.data profiles side by side. Shows per-symbol overhead changes between a baseline and a new measurement. Use this for before/after comparisons — optimization validation, regression detection, or A/B testing. Key parameters:
Output: differential table with baseline%, new%, and delta columns. Both files must be from perf record with compatible events. |
| perf_evlistA | List events in a perf.data file. Always call this first to understand what was recorded before using other tools. Shows each event's name (e.g. 'cpu/cycles/'), type, config, and sampling settings. Use freq=true to see sample frequencies, group=true to see event grouping, verbose=1 for full perf_event_attr details. Output: one event per line (e.g. 'cpu/cycles/Pu'). No prerequisites — works on any perf.data. |
| perf_injectA | Transform a perf.data file: inject build IDs, decode hardware traces, merge scheduler events, or process JIT data. Writes a new perf.data. Use this as a preprocessing step before perf_report or perf_script. Key parameters:
Output: writes a new perf.data file, returns path and size. |
| perf_kallsymsA | Look up a kernel symbol by name. Returns address, type, and module. Does NOT require a perf.data file — reads the running kernel's symbol table directly. Parameters:
Output: ' [module]'. |
| perf_kmem_statA | Kernel memory allocation statistics: slab and page allocator activity with per-callsite breakdown. Use this to find excessive allocators, fragmentation, or leaks. Key parameters:
Output: allocation statistics table. Requires: perf kmem record. |
| perf_kvm_stat_reportA | KVM virtual machine exit analysis: shows VM exit reasons, counts, and time per exit type. Use this to diagnose virtualization overhead — excessive HLT exits indicate idle guests, I/O exits indicate slow device emulation, EPT violations indicate memory mapping churn. Key parameters:
Output: exit reason table with count, time, and percentage. Requires: perf kvm stat record. |
| perf_kwork_reportA | Kernel work item statistics: IRQ, softIRQ, and workqueue handlers with count, total runtime, and max latency. Use this to find the most expensive interrupt handlers or work items. Key parameters:
Output: per-handler statistics table. Requires: perf kwork record. |
| perf_kwork_latencyA | Kernel work item latency breakdown showing scheduling delay for each handler. Key parameters:
Output: per-handler latency table. Requires: perf kwork record. |
| perf_kwork_timehistA | Timestamped kernel work item events showing when each handler ran and for how long. Key parameters:
Output: per-event timeline. Requires: perf kwork record. |
| perf_kwork_topA | Top kernel work items ranked by total runtime. Quick view of the busiest interrupt/softirq/workqueue handlers. Key parameters:
Output: ranked handler list. Requires: perf kwork record. |
| perf_lock_reportA | Lock statistics: acquired count, contended count, and wait times per lock. Use this to find the most contended locks in the system. Key parameters:
Output: per-lock statistics table. Requires: perf lock record or lock tracepoints. |
| perf_lock_contentionA | Detailed lock contention analysis showing where threads wait for locks, with optional BPF-based tracking. Key parameters:
Output: contention table with wait times and optional stacks. Requires: perf lock record or lock tracepoints. |
| perf_lock_infoA | Display general information about locks in perf.data. Shows lock types and configurations found in the recording. Output: lock type and configuration summary. Requires: perf lock record. |
| perf_mem_reportA | Memory access profiling: data source (L1/L2/L3/DRAM), latency, and load/store breakdown. Use this to find cache-miss-heavy code or NUMA-unfriendly access patterns. Key parameters:
Output: memory access histogram with data source breakdown. Requires: perf mem record (or perf record -d). |
| perf_reportA | Histogram profiling: shows which functions consumed the most CPU time (or other events) as a ranked overhead table. This is the primary analysis tool. Use it to answer 'where is time spent?' Key parameters:
Output: table with columns like '% overhead | command | DSO | symbol'. Works on any perf.data from perf record. |
| perf_sched_latencyA | Per-task scheduling latency statistics. Shows max, average, and total scheduling delay per task. Use this to identify tasks that are being starved or experiencing long scheduling delays. Key parameters:
Output: table with task name, max latency, avg latency, switch count. Requires: perf sched record. |
| perf_sched_timehistA | Timestamped scheduler timeline showing every context switch with runtime and scheduling delay. Use this for detailed scheduling analysis -- find when and why tasks were descheduled. Key parameters:
Output: per-event table with timestamp, task, runtime, wait-time, scheduling delay. Requires: perf sched record. |
| perf_sched_mapA | ASCII CPU activity map showing which task ran on which CPU at each time slice. Use this for a visual overview of scheduling patterns, CPU affinity issues, and load imbalance. Key parameters:
Output: ASCII grid with CPUs as rows and time as columns. Requires: perf sched record. |
| perf_sched_scriptA | Dump raw scheduler tracepoint events from perf.data. Use this for custom analysis or when the structured views (latency, timehist, map) don't show what you need. Output: raw tracepoint event lines. Requires: perf sched record. |
| perf_sched_replayA | Replay recorded scheduler events to simulate the original scheduling. Replays the workload's scheduling decisions and reports statistics about the simulated run. Output: replay statistics (throughput, latency). Requires: perf sched record. |
| perf_scriptA | Dump raw per-sample events from perf.data. Each line is one sample with configurable fields. Use this when you need the raw data rather than aggregated histograms — for flamegraph input, custom filtering, or inspecting individual events. Key parameters:
Output: one line per sample. Format depends on fields parameter. Works on any perf.data from perf record. |
| perf_timechartA | Generate a timechart SVG showing CPU activity and task scheduling over time as a visual timeline. Key parameters:
Output: returns the SVG file path and size. Requires: perf timechart record. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/walac/perf-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server