LIBPFM(3)

πŸ’– LIBPFM(3) πŸ’–

okay bestie, welcome to the Linux Programmer's Manual β€” this is the LIBPFM(3) page and it's literally all about one very specific lil PMU. sit down, grab a strawberry πŸ“, we're doing this.


✨ NAME ✨

libpfm_amd64_fam1ah_zen5 β€” support for AMD64 Family 1Ah processors πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <perfmon/pfmlib.h>

PMU name: amd64_fam1ah_zen5 PMU desc: AMD64 Fam1Ah Zen5


🌸 DESCRIPTION 🌸

so the library supports AMD Family 1Ah processors Zen5 core PMU in both 32 and 64-bit modes. yes bestie, both. it's giving versatile. πŸ’…


πŸ‘‘ MODIFIERS πŸ‘‘

these are the modifiers supported on AMD64 Family 1Ah Zen5 core PMU, and no we are not skipping any of them, that would be so not slay of us:

  • u β€” measure at user level, which includes privilege levels 1, 2, 3. this corresponds to PFM_PLM3. it's a boolean modifier. 🫢
  • k β€” measure at kernel level, which includes privilege level 0. this corresponds to PFM_PLM0. also a boolean modifier.
  • h β€” measure while executing in host mode (that's when you're using virtualization). this corresponds to PFM_PLMH. this modifier is available starting with Fam10h. boolean modifier, periodt.
  • g β€” measure while executing in guest mode (again, virtualization girlies rise up). this modifier is available starting with Fam10h. boolean modifier.
  • i β€” invert the meaning of the event. the counter will now count cycles in which the event is not occurring. this is a boolean modifier. lowkey chaotic but iconic.
  • e β€” enable edge detection, i.e., count only when there is a state transition. boolean modifier.
  • c β€” set the counter mask value. the mask acts as a threshold. the counter will count the number of cycles in which the number of occurrences of the event is greater or equal to the threshold. this is an integer modifier with values in the range [0:255]. πŸ”₯
fr fr, c is the only one here that isn't just true/false β€” it takes an actual number, [0:255], don't forget.

🧚 AUTHORS 🧚

Swarup Sahoo


and that's the whole page bestie, we ate and left no crumbs ✨ this was the LIBPFM(3) page from the Linux Programmer's Manual, dated May, 2024 β€” mwah, go count some cycles πŸ’œπŸŒˆ