/intel-vtune-amd-uprof
Intel VTune and AMD uProf profiling skill for microarchitecture analysis. Use when analyzing hotspots, microarchitecture bottlenecks, memory access patterns, pipeline stalls, or using the roofline model. Covers VTune Community Edition (free) and AMD uProf as a free alternative.
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill intel-vtune-amd-uprof --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/intel-vtune-amd-uprof
Context preview
The summary Claude sees to decide when to auto-load this skill.
Intel VTune and AMD uProf profiling skill for microarchitecture analysis. Use when analyzing hotspots, microarchitecture bottlenecks, memory access patterns, pipeline stalls, or using the roofline model. Covers VTune Community Edition (free) and AMD uProf as a free alternative.
SKILL.md
intel-vtune-amd-uprof.SKILL.mdname: intel-vtune-amd-uprof
description: Intel VTune and AMD uProf profiling skill for microarchitecture analysis. Use when analyzing hotspots, microarchitecture bottlenecks, memory access patterns, pipeline stalls, or using the roofline model. Covers VTune Community Edition (free) and AMD uProf as a free alternative. Activates on queries about VTune, uProf, microarchitecture analysis, pipeline stalls, memory bandwidth, roofline model, or hardware performance analysis.
Intel VTune & AMD uProf
Purpose
Guide agents through CPU microarchitecture profiling with Intel VTune Profiler (free Community Edition) and AMD uProf: hotspot identification, microarchitecture analysis, memory access pattern optimization, pipeline stall diagnosis, and roofline model analysis.
Triggers
- "How do I use Intel VTune to profile my code?"
- "What are pipeline stalls and how do I reduce them?"
- "How do I analyze memory bandwidth with VTune?"
- "What is the roofline model and how do I use it?"
- "How do I use AMD uProf as a free alternative to VTune?"
- "My code has good cache hit rates but is still slow"
Workflow
1. VTune setup (free Community Edition)
# Download Intel VTune Profiler (Community Edition — free)
# https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html
# Install on Linux
source /opt/intel/oneapi/vtune/latest/env/vars.sh
# CLI usage
vtune -collect hotspots ./prog
vtune -collect microarchitecture-exploration ./prog
vtune -collect memory-access ./prog
# View results in GUI
vtune-gui &
# File → Open Result → select .vtune directory
# Or use amplxe-cl (legacy CLI)
amplxe-cl -collect hotspots ./prog
amplxe-cl -report hotspots -r result/
2. Analysis types
| Analysis | What it finds | When to use | |----------|--------------|-------------| | Hotspots | CPU-bound functions | First step — find where time is spent | | Microarchitecture Exploration | IPC, pipeline stalls, retired instructions | After hotspot — why is the hotspot slow? | | Memory Access | Cache misses, DRAM bandwidth, NUMA | Memory-bound code | | Threading | Lock contention, parallel efficiency | Multithreaded code | | HPC Performance | Vectorization, memory, roofline | HPC / scientific code | | I/O | Disk and network bottlenecks | I/O-bound code |
3. Hotspot analysis
# Collect and report hotspots
vtune -collect hotspots -result-dir hotspots_result ./prog
# Report top functions by CPU time
vtune -report hotspots -r hotspots_result -format csv | head -20
# CLI output example:
# Function CPU Time Module
# compute_fft 4.532s libfft.so
# matrix_mult 2.108s prog
# parse_input 0.234s prog
Build with debug info for meaningful symbols:
gcc -O2 -g ./prog.c -o prog # symbols visible in VTune
gcc -O2 -g -gsplit-dwarf -fno-omit-frame-pointer ./prog.c -o prog # better stacks
4. Microarchitecture exploration — pipeline stalls
vtune -collect microarchitecture-exploration -r micro_result ./prog
vtune -report summary -r micro_result
Key metrics to examine:
| Metric | Meaning | Good value | |--------|---------|-----------| | IPC (Instructions Per Clock) | How many instructions retire per cycle | x86: aim for > 2.0 | | CPI (Clocks Per Instruction) | Inverse of IPC | Lower is better | | Bad Speculation | Branch mispredictions | < 5% | | Front-End Bound | Instruction decode bottleneck | < 15% | | Back-End Bound | Execution unit or memory stall | < 30% | | Retiring | Useful work fraction | > 70% ideal | | Memory Bound | % cycles waiting for memory | < 20% |
Pipeline Analysis (Top-Down Methodology):
├── Retiring (good, useful work)
├── Bad Speculation (branch mispredictions)
├── Front-End Bound
│ ├── Fetch Latency (I-cache misses, branch mispredicts)
│ └── Fetch Bandwidth
└── Back-End Bound
├── Memory Bound
│ ├── L1 Bound → L1 cache misses
│ ├── L2 Bound → L2 cache misses
│ ├── L3 Bound → L3 cache misses
│ └── DRAM Bound → main memory bandwidth limited
└── Core Bound → ALU/compute bound5. Memory access analysis
# Collect memory access profile
vtune -collect memory-access -r mem_result ./prog
# Key output sections:
# - Memory Bound: % time waiting for memory
# - LLC (Last Level Cache) Miss Rate
# - DRAM Bandwidth: GB/s achieved vs theoretical peak
# - NUMA: cross-socket accesses (for multi-socket systems)
Reading DRAM bandwidth:
DRAM Bandwidth: 18.4 GB/s
Peak Theoretical: 51.2 GB/s
Utilization: 36% — likely not DRAM-bound
If DRAM-bound: optimize data layout (AoS → SoA), reduce working set, improve spatial locality.
6. AMD uProf — free alternative for AMD CPUs
# Download AMD uProf
# https://www.amd.com/en/developer/uprof.html
# CLI profiling
AMDuProfCLI collect --config tbp ./prog # time-based profiling
AMDuProfCLI collect --config assess ./prog # microarchitecture assessment
AMDuProfCLI collect --config memory ./prog # memory access
# Generate report
AMDuProfCLI report -i /tmp/uprof_result/ -o report.html
# Open GUI
AMDuProf &
AMD uProf metrics map to VTune equivalents:
- `Retired Instructions` → IPC analysis
- `Branch Mispredictions` → Bad Speculation
- `L1/L2/L3 Cache Misses` → Memory Bound levels
- `Data Cache Accesses` → Cache efficiency
7. Roofline model
The roofline model shows whether code is compute-bound or memory-bound by comparing achieved performance against hardware limits:
Performance (GFLOPS/s)
| _______________
Peak | /
Perf | / compute bound
| /
| /
| / memory bandwidth bound
| /
+------------------------------→
Arithmetic Intensity (FLOPS/Byte)# VTune roofline collection
vtune -collect hpc-performance -r roofline_result ./prog
# Then: VTune GUI → Roofline view
# For manual calculation:
# Arithmetic Intensity = FLOPS / memory_bytes_accessed
Read more
name: intel-vtune-amd-uprof description: Intel VTune and AMD uProf profiling skill for microarchitecture analysis. Use when analyzing hotspots, microarchitecture bottlenecks, memory access patterns, pipeline stalls, or using the roofline model. Covers VTune Community Edition (free) and AMD uProf as a free alternative. Activates on queries about VTune, uProf, microarchitecture analysis, pipeline stalls, memory bandwidth, roofline model, or hardware performance analysis.
Intel VTune & AMD uProf
Purpose
Guide agents through CPU microarchitecture profiling with Intel VTune Profiler (free Community Edition) and AMD uProf: hotspot identification, microarchitecture analysis, memory access pattern optimization, pipeline stall diagnosis, and roofline model analysis.
Triggers
- "How do I use Intel VTune to profile my code?"
- "What are pipeline stalls and how do I reduce them?"
- "How do I analyze memory bandwidth with VTune?"
- "What is the roofline model and how do I use it?"
- "How do I use AMD uProf as a free alternative to VTune?"
- "My code has good cache hit rates but is still slow"
Workflow
1. VTune setup (free Community Edition)
# Download Intel VTune Profiler (Community Edition — free) # https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html # Install on Linux source /opt/intel/oneapi/vtune/latest/env/vars.sh # CLI usage vtune -collect hotspots ./prog vtune -collect microarchitecture-exploration ./prog vtune -collect memory-access ./prog # View results in GUI vtune-gui & # File → Open Result → select .vtune directory # Or use amplxe-cl (legacy CLI) amplxe-cl -collect hotspots ./prog amplxe-cl -report hotspots -r result/
2. Analysis types
| Analysis | What it finds | When to use | |----------|--------------|-------------| | Hotspots | CPU-bound functions | First step — find where time is spent | | Microarchitecture Exploration | IPC, pipeline stalls, retired instructions | After hotspot — why is the hotspot slow? | | Memory Access | Cache misses, DRAM bandwidth, NUMA | Memory-bound code | | Threading | Lock contention, parallel efficiency | Multithreaded code | | HPC Performance | Vectorization, memory, roofline | HPC / scientific code | | I/O | Disk and network bottlenecks | I/O-bound code |
3. Hotspot analysis
# Collect and report hotspots vtune -collect hotspots -result-dir hotspots_result ./prog # Report top functions by CPU time vtune -report hotspots -r hotspots_result -format csv | head -20 # CLI output example: # Function CPU Time Module # compute_fft 4.532s libfft.so # matrix_mult 2.108s prog # parse_input 0.234s prog
Build with debug info for meaningful symbols:
gcc -O2 -g ./prog.c -o prog # symbols visible in VTune gcc -O2 -g -gsplit-dwarf -fno-omit-frame-pointer ./prog.c -o prog # better stacks
4. Microarchitecture exploration — pipeline stalls
vtune -collect microarchitecture-exploration -r micro_result ./prog vtune -report summary -r micro_result
Key metrics to examine:
| Metric | Meaning | Good value | |--------|---------|-----------| | IPC (Instructions Per Clock) | How many instructions retire per cycle | x86: aim for > 2.0 | | CPI (Clocks Per Instruction) | Inverse of IPC | Lower is better | | Bad Speculation | Branch mispredictions | < 5% | | Front-End Bound | Instruction decode bottleneck | < 15% | | Back-End Bound | Execution unit or memory stall | < 30% | | Retiring | Useful work fraction | > 70% ideal | | Memory Bound | % cycles waiting for memory | < 20% |
Pipeline Analysis (Top-Down Methodology):
├── Retiring (good, useful work)
├── Bad Speculation (branch mispredictions)
├── Front-End Bound
│ ├── Fetch Latency (I-cache misses, branch mispredicts)
│ └── Fetch Bandwidth
└── Back-End Bound
├── Memory Bound
│ ├── L1 Bound → L1 cache misses
│ ├── L2 Bound → L2 cache misses
│ ├── L3 Bound → L3 cache misses
│ └── DRAM Bound → main memory bandwidth limited
└── Core Bound → ALU/compute bound5. Memory access analysis
# Collect memory access profile vtune -collect memory-access -r mem_result ./prog # Key output sections: # - Memory Bound: % time waiting for memory # - LLC (Last Level Cache) Miss Rate # - DRAM Bandwidth: GB/s achieved vs theoretical peak # - NUMA: cross-socket accesses (for multi-socket systems)
Reading DRAM bandwidth:
DRAM Bandwidth: 18.4 GB/s Peak Theoretical: 51.2 GB/s Utilization: 36% — likely not DRAM-bound
If DRAM-bound: optimize data layout (AoS → SoA), reduce working set, improve spatial locality.
6. AMD uProf — free alternative for AMD CPUs
# Download AMD uProf # https://www.amd.com/en/developer/uprof.html # CLI profiling AMDuProfCLI collect --config tbp ./prog # time-based profiling AMDuProfCLI collect --config assess ./prog # microarchitecture assessment AMDuProfCLI collect --config memory ./prog # memory access # Generate report AMDuProfCLI report -i /tmp/uprof_result/ -o report.html # Open GUI AMDuProf &
AMD uProf metrics map to VTune equivalents:
- `Retired Instructions` → IPC analysis
- `Branch Mispredictions` → Bad Speculation
- `L1/L2/L3 Cache Misses` → Memory Bound levels
- `Data Cache Accesses` → Cache efficiency
7. Roofline model
The roofline model shows whether code is compute-bound or memory-bound by comparing achieved performance against hardware limits:
Performance (GFLOPS/s)
| _______________
Peak | /
Perf | / compute bound
| /
| /
| / memory bandwidth bound
| /
+------------------------------→
Arithmetic Intensity (FLOPS/Byte)# VTune roofline collection vtune -collect hpc-performance -r roofline_result ./prog # Then: VTune GUI → Roofline view # For manual calculation: # Arithmetic Intensity = FLOPS / memory_bytes_accessed
A curated suite of AI agent skills for systems and low-level programming — C/C++, Rust, Zig, GPU, bare-metal firmware, Linux kernel/driver development, computer architecture, compiler internals, HPC, and more.
Repo: mohitmishra786/low-level-dev-skills
Other skills on low-level-dev-skills.
- /custom-allocators
Custom allocator skill for memory allocation strategies. Use when implementing pool/slab/arena allocators, tuning jemalloc/mimalloc, writing Rust GlobalAlloc, or benchmarking allocator performance. Activates on queries about jemalloc, mimalloc, tcmalloc, arena allocator,
Open skill - /numa-programming
NUMA programming skill for multi-socket memory locality. Use when detecting NUMA topology, binding processes with numactl, using libnuma API, building NUMA-aware data structures, or measuring remote access penalties. Activates on queries about numactl, libnuma, NUMA topology,
Open skill - /af-xdp
AF_XDP skill for high-performance XDP sockets. Use when creating AF_XDP sockets, configuring UMEM and XSK rings, XDP_REDIRECT programs, copy vs zero-copy mode, or comparing with DPDK. Activates on queries about AF_XDP, xsk_umem, XDP_REDIRECT, libbpf xsk, or zero-copy XDP.
Open skill - /dpdk
DPDK skill for userspace packet I/O. Use when initializing EAL, configuring PMD drivers, using mbuf pools and rte_ring, setting up huge pages, RSS, or testpmd validation. Activates on queries about DPDK, EAL, rte_eth_rx_burst, hugepages, PMD, or testpmd.
Open skill - /io-uring
io_uring skill for Linux async I/O. Use when building high-performance servers with liburing, multi-shot operations, provided buffers, fixed files, zero-copy send, or tokio-uring. Activates on queries about io_uring, SQE/CQE, liburing, IORING_OP_PROVIDE_BUFFERS, or io_uring vs
Open skill - /adc-dac-baremetal
Bare-metal ADC and DAC skill. Use when configuring analog sampling, DMA-driven ADC, calibration, or DAC output on MCUs. Activates on queries about ADC bare-metal, sampling time, DMA ADC, or DAC channel setup.
Open skill

