LIBPFM(3)

🌸 LIBPFM πŸ’… β€” the libpfm_intel_icx_unc_cha era

okay bestie, so this is a page from the Linux Programmer's Manual, section 3 (that's the library-calls girlies), and it's literally all about libpfm_intel_icx_unc_cha β€” aka support for Intel IcelakeX Server CHA uncore PMU. no cap, that's the whole name. let's get into it 🫢


✨ NAME ✨

libpfm_intel_icx_unc_cha β€” support for Intel IcelakeX Server CHA uncore PMU

like. that's her. that's the function of the page. iconic πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

#include <perfmon/pfmlib.h>
  • PMU name: icx_unc_cha[0-39]
  • PMU desc: Intel IcelakeX CHA uncore PMU

yes the include is literally just that one line, we love a minimal queen 🌈


πŸ¦‹ DESCRIPTION πŸ¦‹

so the library supports the Intel IcelakeX CHA (that's coherency and home agent, for the uninitiated β€” iykyk) uncore PMU. πŸ’œ

here's the tea: there's one CHA-box PMU per physical core. which means there are up to forty identical CHA PMU instances, numbered from 0 up to possibly 39. forty of them. forty little guys. obsessed 😭

and on dual-socket systems, that number refers to the CHA PMUs on the socket where the program runs β€” so like, it's socket-local, it's not doing cross-socket shenanigans, periodt.

also each CHA PMU implements 4 generic counters. four. that's it. that's her budget. πŸ’…


πŸ”₯ MODIFIERS πŸ”₯

these are the modifiers supported on the Intel IcelakeX CHA uncore PMU. pay attention bestie, there are three and they're all doing something:

  • e β€” Enable edge detection. meaning: count only when there is a state transition from no occurrence of the event to at least one occurrence. she only counts the ✨moment of change✨. this modifier must be combined with a threshold modifier (t) with a value greater or equal to one. this is a boolean modifier. (no t, no party β€” that's the rule 🚨)
  • t β€” Set the threshold value. when set to a non-zero value, the counter counts the number of CHA clockticks 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]. so yeah, 0 through 255, don't get cute with it πŸ™ˆ
  • i β€” Invert the threshold (t) test from strictly greater than to less or equal to. this is a boolean modifier. she flips the whole vibe of your threshold check πŸ”„
lowkey important: e without a t of at least 1 is not a thing. combine them. be a team player. πŸ’–

πŸ‘‘ AUTHORS πŸ‘‘

Stephane Eranian <eranian@gmail.com>

giving credit where credit is due, thank you legend 🫑


so that's the whole page bestie β€” libpfm_intel_icx_unc_cha, three modifiers, forty CHA instances, four counters each, and one very nice author. slay πŸ’…βœ¨

November, 2023 πŸŽ€ β€” that's when this LIBPFM(3) page was living its truth, straight from the Linux Programmer's Manual. mwah, bye πŸ¦‹πŸ’œ