flamegraph-analysis

Analyze perf, pprof, and cpuprofile data to identify CPU hotspots and bottlenecks.

3|2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/openeuler-mirror/witty-diagnosis-agent --skill flamegraph-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flamegraph-analysis
Source: https://github.com/openeuler-mirror/witty-diagnosis-agent/tree/main/skills/flamegraph-analysis
Command: npx skills add https://github.com/openeuler-mirror/witty-diagnosis-agent --skill flamegraph-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and templates (resource) components.

What problem does it solve?

This Skill solves the complexity of interpreting raw performance data by automatically converting various profiling formats into interactive flame graphs and providing actionable, evidence-based performance insights.

Core Features & Use Cases

  • Multi-Format Analysis: Seamlessly processes folded stacks, perf scripts, cpuprofiles, pprof, and async-profiler outputs.
  • Automated Pattern Detection: Identifies performance anti-patterns like lock contention, GC pressure, and I/O wait using a built-in feature library.
  • Use Case: When your production service experiences latency spikes, provide the CPU profile to this Skill to receive a structured report identifying the exact function causing the bottleneck and a link to an interactive flame graph for visual verification.

Quick Start

Use the flamegraph-analysis skill to analyze the performance profile in 'service-cpu.perf' and identify the root cause of the high CPU usage.

Frequently Asked Questions about flamegraph-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a perf script to identify CPU hotspots and lock contention?

To analyze a perf script for CPU hotspots and lock contention, the profiling data is processed through an automated pipeline that correlates On-CPU and Off-CPU metrics to pinpoint the exact functions causing performance bottlenecks.

Can I use pprof and cpuprofile formats to diagnose latency spikes?

Yes, pprof and cpuprofile formats are supported alongside perf and folded stacks. They are automatically converted into interactive flame graphs to provide evidence-based insights for diagnosing latency spikes.

What is the best way to find the root cause of high CPU usage in production?

The best way to find the root cause of high CPU usage is to analyze production performance profiles using automated pattern detection to identify anti-patterns like GC pressure and I/O wait, generating a structured diagnostic report.

How does correlating On-CPU and Off-CPU data work for performance debugging?

Correlating On-CPU and Off-CPU data works by executing multi-stage analysis pipelines that cross-reference active execution time with idle wait times, enabling precise root cause determination for lock contention and I/O bottlenecks.

Does automated profiling analysis detect GC pressure and I/O wait?

Yes, automated profiling analysis detects GC pressure and I/O wait. It uses a built-in feature library to identify performance anti-patterns and convert raw profiling data into actionable diagnostic insights.