LIBPFM(3)

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

okay bestie, gather round, because we're about to talk about a page from the Linux Programmer's Manual and it's genuinely so niche and so specific and I am obsessed. πŸŽ€


✨ NAME ✨

libpfm_amd64_k7 β€” support for AMD64 K7 processors

no cap, that's literally it. it's the support page for AMD64 K7 processors. short king energy but make it a man page. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <perfmon/pfmlib.h>
PMU name: amd64_k7
PMU desc: AMD64 K7

so like, you include that header, and the PMU you're vibing with is called amd64_k7, and its description is AMD64 K7. that's the whole summoning ritual, bestie. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

The library supports AMD K7 processors in both 32 and 64-bit modes. yep, both. she's versatile, she's flexible, she contains multitudes. 🌈

And β€” this is the part that makes her special β€” they correspond to processor family 6. fr fr. that's the family. write it down. πŸ’œ


✨ MODIFIERS ✨

here come the modifiers, and there are five of them, and we are listing all five because we do not skip. the following modifiers are supported on AMD64 K7 processors:

  • 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. 🫢
  • 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. not me flipping the entire meaning of reality with one letter 😭
  • e β€” enable edge detection, i.e. count only when there is a state transition. it's a boolean modifier. she only cares about the moments of change, main character behavior tbh. πŸ’…
  • 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]. ⭐
heads up bestie: u, k, i and e are booleans, but c takes an actual number, and that number has to live inside [0:255]. don't get it twisted. πŸ™ˆ

πŸŽ€ AUTHORS πŸŽ€

the icons who made this happen:

  • Stephane Eranian <eranian@gmail.com>
  • Robert Richter <robert.richter@amd.com>

give them their flowers, they earned them. πŸ’


and that's the whole page, bestie!! we ate, we left no crumbs, every single flag accounted for. πŸ“

sign-off time: this was LIBPFM(3), dated August, 2010, and honestly? timeless. iconic. periodt. πŸ‘‘βœ¨πŸ’–

πŸ“¦ where this page comes from