LIBPFM(3)

πŸ’– LIBPFM(3) β€” the Intel Knights Corner girlies πŸ’–

okay so bestie, welcome to the Linux Programmer's Manual page for LIBPFM(3), and we're talking about the Intel Knights Corner support specifically. pull up a chair, grab a boba, this one's short and sweet but it's everything πŸ¦‹


✨ NAME ✨

libpfm_intel_knc β€” support for Intel Knights Corner

like, that's the whole vibe. that's the name. it's giving "specialised library module for one specific chip" and honestly? iconic πŸ‘‘


🌸 SYNOPSIS 🌸

#include <perfmon/pfmlib.h>
PMU name: knc
PMU desc: Intel Knights Corner

so you include that header, and the PMU you're working with goes by the name knc, described as Intel Knights Corner. periodt. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

the library supports Intel Knights Corner processors. that's it, that's the description, no cap. short king behaviour fr fr. 🫢


πŸ’œ MODIFIERS πŸ’œ

okay so these are the modifiers you can slap onto events on Intel Knights Corner processors, and every single one of them matters, so let's go one by one bestie:

  • u β€” measure at user level, which includes privilege levels 1, 2, 3. this corresponds to PFM_PLM3. this is a boolean modifier. πŸ“
  • k β€” measure at kernel level, which includes privilege level 0. this corresponds to PFM_PLM0. this is a 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. not me flipping the whole meaning of your event πŸ™ˆ
  • e β€” enable edge detection, i.e., count only when there is a state transition. this is 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. this is an integer modifier with values in the range [0:255]. lowkey the most extra one here and I respect it πŸ’€
  • t β€” measure on all threads at the same time, assuming hyper-threading is enabled. this is a boolean modifier. multitasking main character energy ⭐
heads up bestie: u, k, i, e and t are booleans, so it's a yes-or-no vibe. c is the only integer one and it lives strictly inside [0:255], so don't go freestyling outside that range. 🚫

πŸ‘‘ AUTHORS πŸ‘‘

Stephane Eranian <eranian@gmail.com> β€” ty for your service, king 🫑


and that's the whole page, bestie! this edition of the Linux Programmer's Manual is dated September, 2012, and it's the LIBPFM(3) page, so that's your source and version right there. go forth and count some cycles, you've absolutely ate πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from