LIBPFM(3)
π LIBPFM(3) β the Linux Programmer's Manual, but make it cute π
okay bestie, sit down, hydrate, and let's talk about libpfm_intel_bdx_unc_cbo β yeah the name is a mouthful, i know, but it's literally the support page for the Intel Broadwell Server C-Box uncore PMU and she is serving.
β¨ NAME β¨
libpfm_intel_bdx_unc_cbo β the whole entire vibe is: support for the Intel Broadwell Server C-Box uncore PMU. that's it, that's the name, periodt.
β¨ SYNOPSIS β¨
#include <perfmon/pfmlib.h>
PMU name: bdx_unc_cbo[0-21]
PMU desc: Intel Broadwell Server C-Box uncore PMU
like, just include the header and you're in. slay.
β¨ DESCRIPTION β¨
so the library supports the Intel Broadwell Server C-Box (that's the coherency engine, bestie) uncore PMU. this PMU model shows up on various Broadwell server models β specifically 79 and 86. π
here's the tea: there's one C-box PMU per physical core. which means there are up to twenty-one identical C-Box PMU instances, numbered from 0 to 21. π
and on dual-socket systems?? the number refers to the C-Box PMU on the socket where the program runs. so like, if you're running on CPU18, then bdx_unc_cbo0 refers to the C-Box for physical core 0 on socket 1. conversely, if you're running on CPU0, then that same exact bdx_unc_cbo0 refers to the C-Box for physical core 0 but on socket 0. same name, different socket, it's giving β¨context-dependentβ¨ and honestly? iconic behavior. π¦
also each C-Box PMU implements 4 generic counters and two filter registers that are used only with certain events and umasks. noted, bestie, don't forget it. π
β¨ MODIFIERS β¨
these are the modifiers supported on the Intel Broadwell C-Box uncore PMU, and no you cannot skip any of them, we're doing all of them:
eβ enable edge detection, i.e. count only when there's a state transition from no occurrence of the event to at least one occurrence. β οΈ this one must be combined with a threshold modifier (t) with a value greater or equal to one, or it's not gonna work, bestie. this is a boolean modifier.tβ set the threshold value. when it's set to a non-zero value, the counter counts the number of C-Box 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]. πnfβ Node filter. certain events, likeUNC_C_LLC_LOOKUPandUNC_C_LLC_VICTIMS, provide aNIDumask. sometimes the NID is combined with other filtering capabilities, such as opcodes. the node filter is an 8-bit max bitmask. a node corresponds to a processor socket. the legal values therefore depend on the underlying hardware configuration. for dual-socket systems, the bitmask has two valid bits[0:1]. π (yes, hardware-dependent, read the room before you pick a number)cfβ Core Filter. this is a 5-bit filter used to filter based on the physical core origin of the C-Box request. possible values are0-63. if the filter isn't specified, then no filtering takes place. bits0-3indicate the physical core id and bit4filters on non thread-related data. πtfβ Thread Filter. this is a 1-bit filter used to filter C-Box requests based on logical processor (hyper-thread) identification. possible values are0-1. if the filter isn't specified, then no filtering takes place. π§ncβ Non-Coherent. this is a 1-bit filter used to filter C-Box requests only for theTOR_INSERTSandTOR_OCCUPANCYumasks using theOPCODEmatcher. if the filter isn't specified, then no filtering takes place. πisocβ Isochronous. this is a 1-bit filter used to filter C-Box requests only for theTOR_INSERTSandTOR_OCCUPANCYumasks using theOPCODEmatcher. if the filter isn't specified, then no filtering takes place. π
β¨ Opcode filtering β¨
certain events, such as UNC_C_TOR_INSERTS, support opcode matching on the C-BOX transaction type. bestie, this is a two-step situation, pay attention:
- first, an opcode matching umask must be selected, e.g.
MISS_OPCODE. - second, the opcode to match on must be selected via a second umask among the
OPC_*umasks.
for instance:
UNC_C_TOR_INSERTS:OPCODE:OPC_RFO
counts the number of TOR insertions for RFO transactions. ate. π
opcode matching may also be combined with node filtering with certain umasks. in general, the filtering support is encoded into the umask name, e.g. NID_OPCODE supports both node and opcode filtering. for instance:
UNC_C_TOR_INSERTS:NID_OPCODE:OPC_RFO:nf=1
see how she did that? both filters, one event, main character energy fr fr. π₯
β¨ AUTHORS β¨
Stephane Eranian <eranian@gmail.com> β the icon, the legend, the moment. π«Ά
and that's the whole page, bestie!! π this was LIBPFM(3) from the Linux Programmer's Manual, dated June, 2017 β shoutout to that source and version, she's aging like fine wine. now go count some C-Box cycles, you absolute legend. πβ¨π¦πΈπ
π¦ where this page comes from
- arch rolling: libpfm 4.14.1-1 Β· MIT
- centos-stream 10: libpfm-devel 4.14.1-1.el10 Β· MIT
- centos-stream 9: libpfm-devel 4.14.1-1.el9 Β· MIT
- centos-stream 9: libpfm-devel 4.14.1-1.el9 Β· MIT
- debian bookworm: libpfm4-dev 4.13.0-1 Β· MIT
- debian trixie: libpfm4-dev 4.13.0+git99-gc5587f9-1 Β· MIT
- fedora 43: libpfm-devel 4.13.0-16.fc43 Β· MIT
- fedora 43: libpfm-devel 4.13.0-16.fc43 Β· MIT
- fedora 43: libpfm-devel 4.13.0-20.fc43
- fedora 43: libpfm-devel 4.13.0-20.fc43
- fedora 43: libpfm-devel 4.14.1-2.fc43 Β· MIT
- fedora 43: libpfm-devel 4.14.1-2.fc43 Β· MIT
- fedora 44: libpfm-devel 4.13.0-19.fc44 Β· MIT
- fedora 44: libpfm-devel 4.13.0-19.fc44 Β· MIT
- fedora 44: libpfm-devel 4.13.0-20.fc44
- fedora 44: libpfm-devel 4.13.0-20.fc44
- fedora 44: libpfm-devel 4.14.1-2.fc44 Β· MIT
- fedora 44: libpfm-devel 4.14.1-2.fc44 Β· MIT
- nixos 26.05: papi 7.2.0
- nixpkgs unstable: libpfm 4.14.1
- nixpkgs unstable: papi 7.2.0
- opensuse-leap 16.0: libpfm-devel 4.13.0-160000.3.1 Β· MIT
- ubuntu jammy: libpfm4-dev 4.11.1+git32-gd0b85fb-1 Β· BSD-like
- ubuntu jammy: libpfm4-dev 4.11.1+git32-gd0b85fb-1ubuntu0.1 Β· BSD-like
- ubuntu noble: libpfm4-dev 4.13.0+git32-g0d4ed0e-1 Β· MIT
- ubuntu noble: libpfm4-dev 4.13.0+git32-g0d4ed0e-1ubuntu0.1 Β· MIT
- ubuntu questing: libpfm4-dev 4.13.0+git99-gc5587f9-1
- ubuntu resolute: libpfm4-dev 4.13.0+git106-g3e4031b-1 Β· MIT
- ubuntu resolute: libpfm4-dev 4.13.0+git106-g3e4031b-1ubuntu0.1 Β· MIT
- ubuntu stonking: libpfm4-dev 4.13.0+git106-g3e4031b-1ubuntu1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms