Pipeline Utilization - Pipeline Utilization - 57368

uProf User Guide

Document_ID
57368
Release_Date
2025-06-09
Revision
5.1 English

On AMD “Zen4” and “Zen5”-based processors, AMDuProfPcm supports monitoring and reporting the pipeline utilization (pipeline_util) metrics. This feature provides pipeline_util metrics to visualize the bottlenecks in the CPU pipeline. Use the option -m pipeline_util to monitor and report the level-1 and level-2 top-down metrics.

Level-1 Metrics

Table 1. Level-1 Metrics
Metric Description
Total_Disp_Slots Total dispatch slots; up to six instructions can be dispatched in one cycle.
SMT_Disp_contention Unused dispatch slots as the other thread was selected.
Frontend_Bound Dispatch slots that remained unused because the frontend did not supply appropriate instructions/ops.
Bad_Speculation Dispatched operations that did not retire.
Backend_Bound Dispatch slots that remained unused because of backend stalls.
Retiring Dispatch slots used by operations that retired.

Level-2 Metrics

Table 2. Level-2 Metrics
Metric Description
Frontend_Bound.Latency Unused dispatch slots due to latency bottleneck in the frontend, such as Instruction Cache or ITLB misses.
Frontend_Bound.BW Unused dispatch slots due to bandwidth bottleneck in the frontend, such as decode bandwidth or Op Cache fetch bandwidth.
Bad_Speculation.Mispredicts Dispatched operations that were flushed due to branch mis- predicts.
Bad_Speculation.Pipeline_Restarts Dispatched operations that were flushed due to pipeline restarts (resyncs).
Backend_Bound.Memory Dispatched slots that remained unused because of stalls due to memory subsystem.
Backend_Bound.CPU Dispatched slots that remained unused because of stalls not related to the memory subsystem.
Retiring.Fastpath Dispatch slots used by fastpath operations that retired.
Retiring.Microcode Dispatch slots used by microcode operations that retired.

Due to multiplexing, the reported metrics may be inconsistent. For better results, use taskset to bind the monitored application to a specific set of cores and monitor only the cores on which the monitored application is running.

Run the following command to collect the top-down metrics:

AMDuProfPCm -m pipeline_util  --msr-A system -o /tmp/myapp-td.csv -- /usr/bin/taskset -c 0 myapp.exe
The --msr option requires root privileges. Run sudo ./AMDPcmSetCapability.sh, then open a new terminal tab or run without --msr as noted here:
sudo AMDuProfPCm -m pipeline_util -c core=0 -A system -o /tmp/myapp-td.csv -- /usr/bin/ taskset -c 0 myapp.exe

A sample report is as follows:

Figure 1. Sample Report

Examples

Task Description Command
Timeseries monitoring of level-1 and level-2 top-down metrics (pipeline utilization) of a single- threaded program # AMDuProfPcm -m pipeline_util -c core=1 -o /tmp/td.csv -- /usr/bin/taskset -c 1 /tmp/myapp.exe
Timeseries monitoring of level-1 and level-2 top-down metrics of a multi-threaded program running on all the cores: # AMDuProfPcm -m pipeline_util -a -A system -o /tmp/td.csv -- /tmp/myapp.exe
Cumulative monitoring of level-1 and level-2 top-down metrics of a multi-threaded program running on all the cores # AMDuProfPcm -m pipeline_util -a -A system -C -o /tmp/td.csv -- /tmp/myapp.exe