LIBPFM(3)
β¨ LIBPFM(3) β¨ β the Linux Programmer's Manual one, bestie
okay so picture this: it's a libpfm man page, it lives in section 3 of the Linux Programmer's Manual, and today's episode is all about Intel Tremont. sit down, grab a strawberry π, we're doing this.
πΈ NAME πΈ
libpfm_intel_tmt β support for Intel Tremont core PMU
like, that's the whole vibe. the library does Tremont. iconic behavior honestly π
π SYNOPSIS π
first things first, you gotta pull in the header:
#include <perfmon/pfmlib.h>
and here's the tea you actually need:
- PMU name:
tmt - PMU desc: Intel Tremont
no cap, those two strings are the whole synopsis situation. remember them, you'll be typing tmt a lot π¦
π DESCRIPTION π
the library supports the Intel Tremont core PMU. that's it. that's the sentence. short, sweet, ate π
β¨ MODIFIERS β¨
so on Intel Tremont processors you've got these little modifier besties you can sprinkle onto your events. here's the full roster, no skips, no cuts:
uβ measure at user level, which includes privilege levels 1, 2, and 3. this one corresponds toPFM_PLM3. it's a boolean modifier, so it's just on or off, no in-between πkβ measure at kernel level, which includes privilege level 0. this corresponds toPFM_PLM0. also a boolean modifier, also just vibes π«Άiβ invert the meaning of the event. the counter will now count cycles in which the event is not occurring. yes bestie, it's the "count the opposite" button. this is a boolean modifier πeβ enable edge detection, i.e. count only when there is a state transition from no occurrence of the event to at least one occurrence. real talk: this modifier must be combined with a counter mask modifier (m) with a value greater or equal to one. also a boolean modifier βcβ set the counter mask value. the mask acts as a threshold: the counter will count 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]. so like, not a yes/no girlie, she's got range π
π₯ OFFCORE_RESPONSE events π₯
this is the spicy section, pay attention π
Intel Tremont provides two offcore_response events: OFFCORE_RESPONSE_0 and OFFCORE_RESPONSE_1. and plot twist β the OCR event is aliased to OFFCORE_RESPONSE_0. so when you say OCR, you mean OFFCORE_RESPONSE_0, periodt.
those events need special treatment in the performance monitoring infrastructure, because each event uses an extra register to store some settings. so if multiple offcore_response events are being monitored simultaneously, the kernel has to manage the sharing of that extra register. the kernel is out here doing group project coordination so you don't have to π
the offcore_response event is exposed as a normal event by the library. the extra settings are exposed as regular umasks. the library takes care of encoding the events according for the underlying kernel interface β that's a direct quote from the original energy, keep it, it's canon.
and now the important part, the part where you don't freestyle:
On Intel Tremont, it is not possible to combine the request, supplier, snoop, fields anymore to avoid invalid combinations. as such, the umasks provided by the library are the only ones supported and validated. so please bestie, use the library's umasks, don't go inventing your own combos, it will not slay π
π AUTHORS π
- Stephane Eranian
<eranian@gmail.com>
that's the whole page, you're officially fluent in libpfm_intel_tmt π§
cute sign-off time: this little masterpiece is from March, 2020, and it's filed under LIBPFM(3) β the Linux Programmer's Manual, section 3, exactly where it belongs. bye bestie, go read some counters π
π¦ 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