---
name: "pfm_get_version"
section: "3"
platform: "linux"
package: "libpfm"
version: "4.14.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pfm_get_version"
---

# pfm\_get\_version(3)

get library version

## NAME

pfm\_get\_version - get library version

## SYNOPSIS

```
#include <perfmon/pfmlib.h>

int pfm_get_version(void);

```

## DESCRIPTION

This function can be called at any time to get the revision level of the library. It is not necessary to have invoked **pfm\_initialize()** prior to calling this function.

The revision number is composed of two fields: a major number and a minor number. Both can be extracted using macros provided in the header file:

- **PFMLIB\_MAJ\_VERSION(v)**

  returns the major number encoded in v.

- **PFMLIB\_MIN\_VERSION(v)**

  returns the minor number encoded in v.

## RETURN

The function is always successful, i.e., it always returns the 32-bit version number.

## ERRORS

## AUTHOR

Stephane Eranian \<eranian@gmail.com\>
