LIBPFM(3)
π LIBPFM(3) β the girlies' guide to libpfm_intel_adl_glc π
okay so welcome to the Linux Programmer's Manual bestie, we're talking about libpfm_intel_adl_glc β support for the Intel Alderlake Goldencove (P-Core) core PMU. this is the manual page for libpfm, and she's iconic, no cap. π
β¨ NAME β¨
libpfm_intel_adl_glc β support for Intel Alderlake Goldencove (P-Core) core PMU
like that's literally her whole thing π
πΈ SYNOPSIS πΈ
#include <perfmon/pfmlib.h>
- PMU name:
adl_glc - PMU desc: Intel Alderlake Goldencove (P-core)
π¦ DESCRIPTION π¦
so the library supports the Intel Alderlake Goldencove (P-Core) core PMU. but lowkey important: this PMU model only covers each core's PMU and not the socket level PMU. like, core-level only, she's not doing the whole socket, periodt.
and because this processor is out here living that hybrid architecture life with a P-Core and an E-Core that have a different PMU model, you may need to force a PMU instance name to get the encoding you actually want. it's giving "pick a lane, bestie". for instance:
- encode for the P-Core:
adl_glc::BR_INST_RETIRED - encode for the E-core:
adl_grt::BR_INST_RETIRED
ngl this distinction matters so much, iykyk.
on Adlerlake Goldencove (P-Core), the number of generic counters depends on the Hyperthreading (HT) mode. yes, HT changes the counter count, she's flexible like that β¨
the pfm_get_pmu_info() function returns the maximum number of generic counters in num_cntrs.
π MODIFIERS π
the following modifiers are supported on Intel SapphireRapid processors:
uβ measure at user level, which includes privilege levels 1, 2, 3. this corresponds toPFM_PLM3. this is a boolean modifier.kβ measure at kernel level, which includes privilege level 0. this corresponds toPFM_PLM0. this is a boolean modifier.iβ invert the meaning of the event. the counter will now count cycles in which the event is not occurring. 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. this modifier must be combined with a counter mask modifier (m) with a value greater or equal to one. this is 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 is an integer modifier with values in the range[0:255].intxβ monitor the event only when executing inside a transactional memory region (in tx). event does not count otherwise. this is a boolean modifiers. default value is0.intxcpβ do not count occurrences of the event when they are inside an aborted transactional memory region. this is a boolean modifier. default value is0.ldlatβ pass a latency threshold in core cycles to theMEM_TRANS_RETIRED:LOAD_LATENCYevent. this is an integer attribute that must be in the range[1:65535]. it is required for this event. the library provides a set of presets for specific latencies, such as128. note that the event must be used with precise sampling (PEBS).
π₯ FRONTEND_RETIRED event π₯
for Alderlake Goldencove (P-Core), the library uses the hardcoded bubble width and bubble length provided by Intel preset events. it is not possible to tweak either the latency or the width via the library. sorry bestie, those knobs are not yours to turn π
π OFFCORE_RESPONSE events π
Intel Alderlake Goldencove (P-Core) supports two encodings for offcore_response events (0x2a, 0x2b). in the library, these are called OCR0 and OCR1. the two encodings are equivalent.
on Linux, the kernel can schedule any OCR encoding into any of the two OCR counters. the offcore_response events are exposed as a normal events by the library. the extra settings are exposed as regular umasks. the library takes care of encoding the events according to the underlying kernel interface. she handles it, don't worry π«Ά
on Intel Alderlake Goldencove (P-Core), the event is treated as a regular event with a flat set of umasks to choose from. it is not possible to combine the various requests, supplier, snoop bits anymore. the library offers the list of validated combinations as per Intel's official event list.
no cap: the combining era is over on this one. flat umasks only, bestie. π
π AUTHORS π
Stephane Eranian <eranian@gmail.com>
and that's the whole page, mwah π this was LIBPFM(3) from the Linux Programmer's Manual, dated February, 2024 β version LIBPFM(3), slay, go read your counters and stay hydrated ππ§π
π¦ 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 trixie: libpfm4-dev 4.13.0+git99-gc5587f9-1 Β· MIT
- 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.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
- 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