---
name: "pmc.iaf"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/pmc.iaf"
---

# pmc.iaf(3)

measurement events for Intel fixed function performance counters.

## NAME

**pmc.iaf** – measurement events for Intel fixed function performance counters.

## LIBRARY

library “libpmc”

## SYNOPSIS

**#include \<pmc.h\>**

## DESCRIPTION

Intel fixed-function PMCs are present in CPUs that conform to version 2 or later of the Intel Performance Measurement Architecture. Each fixed-function PMC measures a specific hardware event. The number of fixed-function PMCs implemented in a CPU can vary. The number of fixed-function PMCs present can be determined at runtime by using function [pmc\_cpuinfo(3)](/pmc_cpuinfo/3.md).

Intel fixed-function PMCs are documented in “Volume 3: System Programming Guide”, *IA-32 Intel(R) Architecture Software Developer's Manual*, Order Number 253669-027US, Intel Corporation, July 2008.

### PMC Capabilities

Fixed-function PMCs support the following capabilities:

| | |
| --- | --- |
| *Capability* | *Support* |
| PMC\_CAP\_CASCADE | No |
| PMC\_CAP\_EDGE | No |
| PMC\_CAP\_INTERRUPT | Yes |
| PMC\_CAP\_INVERT | No |
| PMC\_CAP\_READ | Yes |
| PMC\_CAP\_PRECISE | No |
| PMC\_CAP\_SYSTEM | Yes |
| PMC\_CAP\_TAGGING | No |
| PMC\_CAP\_THRESHOLD | No |
| PMC\_CAP\_USER | Yes |
| PMC\_CAP\_WRITE | Yes |

### Class Name Prefix

These PMCs are named using a class name prefix of “iaf-”.

### Event Qualifiers (Fixed Function PMCs)

These PMCs support the following modifiers:

- os

  Configure the PMC to count events occurring at ring level 0.

- usr

  Configure the PMC to count events occurring at ring levels 1, 2 or 3.

- anythread

  (Atom CPUs) Configure the PMC to count events on all logical processors sharing a processor core. The default is to count events on the current logical processor.

If neither of the “os” or “usr” qualifiers are specified, the default is to enable both.

### Event Specifiers (Fixed Function PMCs)

The fixed function PMCs are selectable using the following event names:

- INSTR\_RETIRED.ANY

  (Fixed Function Counter 0) The number of instructions retired.

- CPU\_CLK\_UNHALTED.CORE

  (Fixed Function Counter 1) The number of core cycles for which the core is not halted.

- CPU\_CLK\_UNHALTED.REF

  (Fixed Function Counter 2) The number of reference cycles for which the core is not halted.

## EXAMPLES

To measure the number of core cycles for which the core was not halted use the event specifier "iaf-cpu-clk-unhalted.core".

To measure the number of user instructions retired use the event specifier "iaf-instr-retired.any,usr".

To measure the number of user instructions retired on all logical processors in an Atom CPU, use the event specifier "iaf-instr-retired.any,usr,anythread".

## SEE ALSO

[pmc(3)](/pmc/3.md), [pmc.amd(3)](/pmc.amd/3.md), [pmc.atom(3)](/pmc.atom/3.md), [pmc.core(3)](/pmc.core/3.md), [pmc.core2(3)](/pmc.core2/3.md), [pmc.ibs(3)](/pmc.ibs/3.md), [pmc.soft(3)](/pmc.soft/3.md), [pmc.tsc(3)](/pmc.tsc/3.md), [pmc\_cpuinfo(3)](/pmc_cpuinfo/3.md), [pmclog(3)](/pmclog/3.md), [hwpmc(4)](/hwpmc/4.md)

## HISTORY

The **pmc** library first appeared in FreeBSD 6.0.

## AUTHORS

The library “libpmc” library was written by Joseph Koshy ⟨*jkoshy@FreeBSD.org*⟩.
