Intel
Windows
https://github.com/KelvinMsft/PerfMon
Linux
https://github.com/SlugLab/pmi-program-progress
AMD
uperf source code, You can use LBR.
https://github.com/KelvinMsft/PerfMon
https://github.com/SlugLab/pmi-program-progress
uperf source code, You can use LBR.