LIBPFM(3)

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

okay so bestie, this is a page from the Linux Programmer's Manual β€” yes that one β€” and today's main character is libpfm_amd64_fam19h_zen4. she's giving "support for AMD64 Family 19h processors" and honestly? iconic. no cap. πŸŽ€


✨ NAME ✨

libpfm_amd64_fam19h_zen4 β€” support for AMD64 Family 19h processors πŸ¦‹


🌸 SYNOPSIS 🌸

#include <perfmon/pfmlib.h>
PMU name: amd64_fam19h_zen4
PMU desc: AMD64 Fam19h Zen4

πŸ’… DESCRIPTION πŸ’…

so like, the library supports the AMD Family 19h processors Zen4 core PMU, and she does it in both 32 and 64-bit modes. versatile queen behavior fr fr πŸ‘‘


πŸ”₯ MODIFIERS πŸ”₯

here's the modifiers supported on the AMD64 Family 19h Zen4 core PMU, bestie β€” read them, love them, memorize them 🫢

  • 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. it's a boolean modifier. πŸ’œ
  • h β€” measure while executing in host mode (aka when you're using virtualization). this corresponds to PFM_PLMH. this modifier is available starting with Fam10h. it's a boolean modifier. 🧚
  • g β€” measure while executing in guest mode (aka when you're using virtualization). this modifier is available starting with Fam10h. it's a boolean modifier. 🌈
  • i β€” invert the meaning of the event. the counter will now count cycles in which the event is not occurring. it's a boolean modifier. πŸ’€
  • e β€” enable edge detection, i.e., count only when there is a state transition. it's a 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. it's an integer modifier with values in the range [0:255]. πŸ‘‘

πŸ‘‘ AUTHORS πŸ‘‘

Stephane Eranian πŸ’–


that's the whole vibe bestie β€” written up back in December, 2022, for LIBPFM(3). go forth and count some cycles, periodt πŸŒΈπŸ’…

πŸ“¦ where this page comes from