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