Custom Metrics - Custom Metrics - 57368

uProf User Guide

Document ID
57368
Release Date
2025-06-09
Revision
5.1 English
Use this option to write your own custom metrics and profile only for those metrics. This option helps exclude all unwanted metrics from the options mentioned earlier to minimize the overhead of multiplexing. However, this option requires knowledge of PMC encoding and knowledge of metrics that you want to profile for. Here is an example of metrics along with an AMDuProfSys command to get the profile data.
TotalRetiredBranceNotTaken= total retired branch- retired branch taken
= PMCx0C2 – umask 0x0 - PMCx0C4 – umask 0x0
= 0x4300C2-0x4300C4
RetiredBranceNotTaken = (TotalRetiredBranceNotTaken * 1000) / Total retired instructions
= (TotalRetiredBranceNotTaken * 1000) / 0x4300C0
Example command:
AMDuProfSys --metrics core/TotalRetiredBranceNotTaken="0x4300C2-0x4300C4",core/RetiredBranceNotTaken="(TotalRetiredBranceNotTaken*1000)/0x4300C0"

Output:

Figure 1. Custom Metrics