LIBPFM(3)
π LIBPFM β the Linux Programmer's Manual situation π
okay bestie, pull up a chair, we're doing the LIBPFM(3) page and it's giving deep lore. this is the manual for libpfm_amd64_fam15h β support for AMD64 Family 15h processors π¦
β¨ NAME β¨
libpfm_amd64_fam15h β support for AMD64 Family 15h processors
πΈ SYNOPSIS πΈ
#include <perfmon/pfmlib.h>
and then the PMU glow-ups themselves:
PMU name: amd64_fam15h_interlagos
PMU desc: AMD64 Fam15h Interlagos
PMU name: amd64_fam15h_nb
PMU desc: AMD64 Fam15h Northbridge
like, two whole PMUs, two whole vibes π
π DESCRIPTION π
so the tea is: this library supports the AMD Family 15h processors core PMU, and it works in both 32-bit and 64-bit modes. yes ma'am, both. equal opportunity counting π₯
and the uncore (that's the NorthBridge) PMU? it's also supported, but as a separate PMU model β it's not sharing a room with the core PMU, it has main character energy of its own π
π MODIFIERS π
here's the list of modifiers supported on the AMD64 Family 15h core PMU. these are the little suffixes that change the vibe of your event, iykyk:
uβ measure at user level, which includes privilege levels1,2,3. this maps toPFM_PLM3. it's a boolean modifier β¨kβ measure at kernel level, which includes privilege level0. this maps toPFM_PLM0. also a boolean modifier πhβ measure while executing in host mode (so, when you're doing the virtualization thing). this maps toPFM_PLMH. heads up: this modifier is available starting with Fam10h. boolean modifier, periodt π«Άgβ measure while executing in guest mode (again, virtualization girlies rise). this modifier is available starting with Fam10h. boolean modifier πiβ invert the meaning of the event. the counter will now count cycles in which the event is not occurring. iconic little chaos move. boolean modifier πeβ enable edge detection, meaning it counts only when there's a state transition. boolean modifier βcβ set the counter mask value. the mask acts as a threshold: the counter counts the number of cycles in which the number of occurrences of the event is greater or equal to the threshold. this one is an integer modifier with values in the range[0:255]π₯
β οΈ and now the important one: the uncore (NorthBridge) PMU does not support any modifiers. none. zero. not a single one. so don't come for it with suffixes, bestie π
π AUTHORS π
the legends behind all this:
Stephane Eranian <eranian@gmail.com>Robert Richter <robert.richter@amd.com>
and that's the whole page, babe π this version is from Nov, 2013, and it lives in the LIBPFM(3) section of the Linux Programmer's Manual β so go forth, count those cycles, and slay πΈπ§π
π¦ 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