LIBPFM(3)

LIBPFM πŸ’– (that's the Linux Programmer's Manual, bestie, section 3)

okay so first things first: this whole page is about libpfm_intel_ivbep_unc_pcu β€” the support for the Intel Ivy Bridge-EP Power Controller Unit (PCU) uncore PMU. say that five times fast. i'll wait. 🫢


✨ NAME ✨

libpfm_intel_ivbep_unc_pcu β€” support for Intel Ivy Bridge-EP Power Controller Unit (PCU) uncore PMU

like. that's the whole name. it's long but it's hers. πŸ’…


🌸 SYNOPSIS 🌸

#include <perfmon/pfmlib.h>

PMU name: ivbep_unc_pcu PMU desc: Intel Ivy Bridge-EP PCU uncore PMU


πŸ¦‹ DESCRIPTION πŸ¦‹

so the library supports the Intel Ivy Bridge Power Controller Unit uncore PMU. that's the vibe. 🧚

and here's the tea: this PMU model only exists on Ivy Bridge model 62. like, if you're not on model 62, this is not your moment. no cap.


πŸ’… MODIFIERS πŸ’…

here are the modifiers that this Intel Ivy Bridge PCU uncore PMU supports. yes, all of them. i would never gatekeep:

  • e β€” turn on edge detection. translation: it only counts when there's a state transition from no occurrence of the event to at least one occurrence. and listen β€” this modifier must be combined with a threshold modifier (t) whose value is greater than or equal to one. it's a boolean modifier, so it's giving on/off energy. ✨
  • t β€” set the threshold value. when it's set to a non-zero value, the counter counts the number of HA cycles in which the number of occurrences of the event is greater than or equal to the threshold. it's an integer modifier and its values live in the range [0:15]. πŸŽ€
  • ff β€” turn on frequency band filtering. this one is picky: it applies only to the UNC_P_FREQ_BANDx_CYCLES events, where x is [0-3]. it expects an integer in the range [0-255], and that value gets interpreted as a frequency value to be multiplied by 100Mhz. so if the value is 32, then all cycles where the processor is running at 3.2GHz and more are counted. math is math. πŸ”₯

🌈 Frequency band filtering 🌈

okay so there are 3 events which support frequency band filtering, namely, UNC_P_FREQ_BAND0_CYCLES, UNC_P_FREQ_BAND1_CYCLES, UNC_P_FREQ_BAND2_CYCLES, UNC_P_FREQ_BAND3_CYCLES. (yes bestie i know, it says 3 and then lists 4. i'm just the messenger. πŸ’€)

the frequency filter β€” available via the ff modifier β€” is stored into a PMU shared register which holds all 4 possible frequency bands, one per event. however, the library generates the encoding for each event individually, because it processes events one at a time. so the caller, or the underlying kernel interface, may have to merge the band filter settings to program the filter register properly. it's giving teamwork. 🫢


πŸ‘‘ AUTHORS πŸ‘‘

  • Stephane Eranian <eranian@gmail.com>

lowkey important: this page is from February, 2014 and it belongs to LIBPFM(3), the Linux Programmer's Manual. so that's the source, the version and the date, all wrapped up in a cute little sign-off. mwah. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ
πŸ“¦ where this page comes from