LIBPFM(3) Linux Programmer's Manual LIBPFM(3)

# [NAME](#NAME)

pfm\_get\_version - get library version

# [SYNOPSIS](#SYNOPSIS)

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

int pfm_get_version(void);

```

# [DESCRIPTION](#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)**](#PFMLIB_MAJ_VERSION%28v%29)

returns the major number encoded in v.

[**PFMLIB\_MIN\_VERSION(v)**](#PFMLIB_MIN_VERSION%28v%29)

returns the minor number encoded in v.

# [RETURN](#RETURN)

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

# [ERRORS](#ERRORS)

# [AUTHOR](#AUTHOR)

Stephane Eranian &lt;eranian@gmail.com&gt;

September, 2009

---

Document: pfm_get_version(3) from libpfm 4.14.1-r0 (Chainguard OS)
Source: https://git.code.sf.net/p/perfmon2/libpfm4
