Skip to main content
Glama
walac

perf-mcp

by walac

perf_diff

Compare two perf.data profiles to expose per-symbol overhead changes for optimization validation, regression detection, or A/B testing.

Instructions

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:

  • old_input: path to baseline perf.data (required).

  • new_input: path to comparison perf.data (required).

  • compute: comparison method — 'delta' (default, percentage-point difference), 'delta-abs' (absolute), 'ratio' (new/old), 'wdiff' (weighted), 'cycles' (cycle-level).

  • formula: true to show the computation formula.

  • symbols/dsos/comms: filter scope.

  • baseline_only: show only symbols present in baseline.

Output: differential table with baseline%, new%, and delta columns. Both files must be from perf record with compatible events.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cpuNoCPUs to filter
pidNoOnly consider these PIDs
tidNoOnly consider these TIDs
dsosNoOnly consider these DSOs
sortNoSort by key(s)
timeNoTime span of interest
commsNoOnly consider these comms
forceNoDon't complain, do it
orderNoSpecify compute sorting column (0-based index)
quietNoDo not show any warnings or messages
symfsNoSymbol filesystem root
periodNoShow period values instead of percent
streamNoEnable hot stream comparison
computeNoComparison method
formulaNoShow formula for computed values
modulesNoLoad module symbols
symbolsNoOnly consider these symbols
verboseNoVerbosity level
vmlinuxNovmlinux pathname
kallsymsNokallsyms pathname
new_inputYesPath to the comparison perf.data file
old_inputYesPath to the baseline perf.data file
percentageNoHow to display percentage
cycles_histNoDisplay cycle histogram
baseline_onlyNoShow only items with match in baseline
dump_raw_traceNoDump raw trace in ASCII
field_separatorNoSeparator for columns

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must handle behavioral transparency. It does disclose that both files must be from perf record with compatible events and describes the output format. However, it does not explicitly state whether the operation is read-only or has any side effects, which is a gap without annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-organized: it starts with the core purpose, follows with a usage sentence, a recognizable list of key parameters, the output format, and then a constraint. Every sentence adds information and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the essential output (differential table with columns) and the prerequisite (compatible events), which is important given the large schema and no provided output schema. It doesn't explain every parameter, but it highlights the key ones and gives enough context to successfully invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage, giving a baseline of 3. The description adds value by clearly identifying old_input as baseline and new_input as comparison, and by expanding the compute parameter with valid methods ('delta', 'delta-abs', 'ratio', 'wdiff', 'cycles'), which goes beyond the schema's generic 'Comparison method' label.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool compares two perf.data profiles side by side and shows per-symbol overhead changes between baseline and new measurement. It also mentions concrete use cases (optimization validation, regression detection, A/B testing), which distinctly positions it against siblings like perf_report or perf_annotate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs when to use the tool: 'Use this for before/after comparisons — optimization validation, regression detection, or A/B testing.' This gives clear context, though it does not explicitly mention when not to use it or name alternative tools, so a score of 4 is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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