Skip to main content
Glama
walac

perf-mcp

by walac

perf_c2c_report

Identify cache lines with the most HITM events in perf.data files to pinpoint cache-to-cache false sharing and diagnose multi-threaded performance issues.

Instructions

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:

  • display: 'tot' (total HITMs, default), 'lcl' (local/same-socket), 'rmt' (remote/cross-socket).

  • coalesce: group results by 'tid,pid,iaddr,dso' to see per-thread or per-address breakdown.

  • stats: true to show only summary statistics.

  • call_graph: enable callchain display.

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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cpuNoCPUs to filter
sortNoSort by key(s)
eventNoEvent selector
forceNoDon't complain, do it
inputYesPath to perf.data file
ldlatNoLoad latency threshold in cycles
statsNoDisplay only statistics (no reports)
displayNoDisplay type
verboseNoVerbosity level (0-2)
vmlinuxNovmlinux pathname
all_userNoOnly show user space entries
coalesceNoCoalesce fields (e.g. 'tid,pid,iaddr,dso')
show_allNoShow all captured HITM lines
double_clNoDouble the cache line size
no_sourceNoDo not display source line column
node_infoNoShow extra node info
all_kernelNoOnly show kernel space entries
call_graphNoCall graph options
stitch_lbrNoEnable LBR callgraph stitching
full_symbolsNoDisplay full length of symbols
disassembler_styleNoDisassembler style (e.g. intel)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations exist, so the description carries the full burden. It discloses what the tool does (HITM analysis), key parameter behaviors, output structure, and a prerequisite ('perf record -d -a'). It does not describe error handling or exit codes, but for a read-only analysis tool, this is sufficient.

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 well-structured and concise, starting with a clear definition, then usage guidance, key parameters in a bulleted list, output summary, and a prerequisite. Every sentence contributes information without 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?

Given the tool's complexity (21 parameters, output schema), the description provides essential context: purpose, usage scenario, key parameters, output format, and prerequisite. It does not explain every parameter, but the schema already covers those. The description adds context that is not available elsewhere, making it complete enough for an AI agent to select and invoke the tool correctly.

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 input schema already describes all 21 parameters, achieving 100% coverage. The description adds extra meaning for key parameters like display (explaining 'tot', 'lcl', 'rmt' values), coalesce (example grouping), stats, and call_graph, going beyond the schema's minimal descriptions. This added value justifies a score above baseline.

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 identifies the tool as a cache-to-cache false sharing analysis, specifically detecting cache lines with the most HITM events. This distinguishes it from sibling perf tools like perf_mem_report or perf_report, which focus on different aspects of memory and performance analysis.

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?

It explicitly states when to use the tool: to diagnose multi-threaded performance issues from false sharing. However, it does not mention when NOT to use it or point to alternatives. This is clear usage context but lacks explicit exclusions or alternative recommendations.

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