LIBPFM(3)

✨ NAME ✨

libpfm_intel_x86_arch β€” the girl who shows up for Intel X86 architectural PMU πŸ’…


🌸 SYNOPSIS 🌸

#include <perfmon/pfmlib.h>

PMU name: ix86arch
PMU desc: Intel X86 architectural PMU

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so bestie, listen πŸ’– β€” this library supports any processor that implements the Intel architectural PMU. That's the whole vibe.

It's a minimal PMU: a variable number of counters, but a predefined set of events. No surprises, no drama. And it's literally implemented in all recent processors starting with Intel Core Duo/Core Solo, so it's been around, it's not new here πŸ‘‘

Here's the main character moment though: it acts as a default PMU support in case the library gets run on a very recent processor for which the specific support has not yet been implemented. Like, the understudy who's always ready. Understood the assignment fr fr 🫢


πŸŽ€ MODIFIERS πŸŽ€

The following modifiers are supported on Intel architectural PMU:

  • u β€” measure at user level, which includes privilege levels 1, 2, 3. This corresponds to PFM_PLM3. It's a boolean modifier πŸ’«
  • k β€” measure at kernel level, which includes privilege level 0. This corresponds to PFM_PLM0. Also a boolean modifier πŸ’«
  • i β€” invert the meaning of the event. The counter will now count cycles in which the event is not occurring. Boolean modifier, yes ma'am.
  • e β€” enable edge detection, i.e., count only when there is a state transition. 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] πŸ”’
  • t β€” measure on both threads at the same time, assuming hyper-threading is enabled. Heads up bestie: this modifier requires at least version 3 of the architectural PMU. Boolean modifier.

πŸ‘‘ AUTHORS πŸ‘‘

Stephane Eranian <eranian@gmail.com>


September, 2009 β€” that's the date on this one, from the Linux Programmer's Manual, and it lives as LIBPFM(3) in the manual lineup. slay, go read it, ily πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from