LIBPFM(3)
π LIBPFM(3) β Linux Programmer's Manual π
okay so bestie, welcome to the libpfm_intel_snbep_unc_cbo page from the Linux Programmer's Manual π«Ά this is the one about Intel Sandy Bridge-EP C-Box uncore PMU support, and ngl it's kinda niche but it's also kinda iconic. sit down, grab a strawberry π, let's get into it.
β¨ NAME β¨
libpfm_intel_snbep_unc_cbo β support for Intel Sandy Bridge-EP C-Box uncore PMU
like. that's the whole vibe. it's the support page. π
π SYNOPSIS π
#include <perfmon/pfmlib.h>
PMU name: snbep_unc_cbo[0-7]
PMU desc: Intel Sandy Bridge-EP C-Box uncore PMU
so you pull in perfmon/pfmlib.h, and the PMU you're working with is named snbep_unc_cbo[0-7] and its description is literally "Intel Sandy Bridge-EP C-Box uncore PMU". that's it. that's the whole intro. π
π¦ DESCRIPTION π¦
so this library supports the Intel Sandy Bridge C-Box (coherency engine) uncore PMU. periodt.
heads up: this PMU model only exists on Sandy Bridge model 45. no other model. just 45. don't come for me, that's what it says π
there is one C-box PMU per physical core. so do the math bestie, that means there are eight identical C-Box PMU instances, numbered from 0 to 7. eight. one per core. slay.
now here's the tea 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 CPU8, then snbep_unc_cbo0 refers to the C-Box for physical core 0 on socket 1. but flip it β if you're running on CPU0, then that same snbep_unc_cbo0 refers to the C-Box for physical core 0 but on socket 0. same name, different socket, depending on where you're standing. it's giving relativity honestly π§
each C-Box PMU implements 4 generic counters and a filter register that's used only with certain events and umasks. lowkey important detail, don't skip it.
π MODIFIERS π
okay this is the main character section. the following modifiers are supported on the Intel Sandy Bridge C-Box uncore PMU:
iβ invert the meaning of the event π the counter will now count C-Box cycles in which the event is not occurring. this is a boolean modifier.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 modifier must be combined with a threshold modifier (t) with a value greater or equal to one. this is a boolean modifier.tβ set the threshold value. when 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]. no cap on the drama, but there is a cap on the value π₯nfβ node filter πΈ certain events, such asUNC_C_LLC_LOOKUP,UNC_C_LLC_VICTIMS, provide aNIDumask. sometimes theNIDis 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].cfβ Core Filter π this is a 3-bit filter used to filter based on the physical core origin of the C-Box request. possible values are 0-7. if the filter is not specified, then no filtering takes place. simple as.tfβ Thread Filter π this is a 1-bit filter used to filter C-Box requests based on logical processor (hyper-thread) identification. possible values are 0-1. if the filter is not specified, then no filtering takes place. same energy as above tbh.
π Opcode filtering π
certain events, such as UNC_C_TOR_INSERTS, support opcode matching on the C-BOX transaction type. here's how you do it, step by step bestie:
- 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 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
iykyk π
π«Ά AUTHORS π«Ά
Stephane Eranian <eranian@gmail.com>
and that's the whole page, bestie π this was the LIBPFM(3) page from August, 2012, part of the Linux Programmer's Manual β no cap, that's genuinely the source and date. go forth and count your C-Box cycles responsibly π¦β¨π
π¦ 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