# AMD ROCm introduces instruction-level GPU hotspot profiling via PC Sampling

> **Key takeaway:** The ROCprofiler-SDK now supports Program Counter (PC) sampling to identify specific GPU instruction hotspots in precompiled binaries without requiring code instrumentation.

**Published:** 2026-11-26T18:02:37.957616+00:00 
**Source:** AMD ROCm Official Blog 
**Category:** ai-local-edge 
**Canonical URL:** https://fosswire.org/news/amd-rocm-introduces-instruction-level-gpu-hotspot-profiling-.html 

## Summary
AMD has announced new instruction-level profiling capabilities within the ROCprofiler-SDK, part of the ROCm software stack (version 6.4 and later). By utilizing Program Counter (PC) sampling, developers can now identify exact execution hotspots and stalls within GPU kernels without needing to modify source code or recompile binaries.

The update introduces two distinct sampling methodologies: a software-based 'host-trap' method and a hardware-assisted 'stochastic' method. While the software approach provides a broad view of where time is spent, the hardware-based approach offers deeper insights into specific stall reasons and execution states on newer CDNA architectures.

## Technical implementation of PC Sampling in ROCprofiler-SDK
- **Software-based (host-trap) sampling:** Uses a background host thread to periodically trap running waves to capture program counter data; supported on AMD CDNA GPUs starting with the Instinct MI200 series.
- **Hardware-based (stochastic) sampling:** Utilizes dedicated GPU hardware to sample waves on a cycle-based schedule, providing enriched data including instruction types, stall reasons, and arbiter states on CDNA 3, 4, and 5 architectures (e.g., Instinct MI300/MI350/MI455X).
- **Non-intrusive profiling:** The technique is statistical and does not require kernel serialization or manual instrumentation, allowing developers to profile production-ready, precompiled binaries directly.
- **Instruction-to-source mapping:** While the profiler always decodes samples to assembly instructions, mapping these back to specific source code lines is supported if the binary was compiled with debug symbols (-g).

## Why it matters
This development significantly lowers the barrier for optimizing high-performance computing (HPC) and AI workloads on AMD hardware. By allowing developers to diagnose performance bottlenecks in existing binaries, it accelerates the optimization of complex libraries and frameworks without the friction of constant recompilation cycles.