---
name: "pmc_name_of_capability"
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_name_of_capability"
---

# pmc\_name\_of\_capability(3)

human readable names for numeric constants used by pmc(3) and hwpmc(4)

## NAME

**pmc\_name\_of\_capability**, **pmc\_name\_of\_class**, **pmc\_name\_of\_cputype**, **pmc\_name\_of\_disposition**, **pmc\_name\_of\_event**, **pmc\_name\_of\_mode**, **pmc\_name\_of\_state** – human readable names for numeric constants used by [pmc(3)](/pmc/3.md) and [hwpmc(4)](/hwpmc/4.md)

## LIBRARY

library “libpmc”

## SYNOPSIS

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

*const char \**\

**pmc\_name\_of\_capability**(*enum pmc\_caps pc*);

*const char \**\

**pmc\_name\_of\_class**(*enum pmc\_class pc*);

*const char \**\

**pmc\_name\_of\_cputype**(*enum pmc\_cputype ct*);

*const char \**\

**pmc\_name\_of\_disposition**(*enum pmc\_disp pd*);

*const char \**\

**pmc\_name\_of\_event**(*enum pmc\_event pe*);

*const char \**\

**pmc\_name\_of\_mode**(*enum pmc\_mode pm*);

*const char \**\

**pmc\_name\_of\_state**(*enum pmc\_state ps*);

## DESCRIPTION

These convenience functions translate numeric constants used by the library “libpmc” to *const char \** pointers to human readable representations of their arguments.

Function **pmc\_name\_of\_capability**() translates a PMC capability flag given in argument *pc* to a human readable string. PMC capabilities are described in [pmc(3)](/pmc/3.md).

Function **pmc\_name\_of\_class**() translates the PMC class value specified in argument *pc* to a human readable name. PMC classes are described in [pmc(3)](/pmc/3.md).

Function **pmc\_name\_of\_cputype**() translates the CPU type value specified in argument *ct* to a human readable name. CPU types known to the library are described in [pmc(3)](/pmc/3.md).

Function **pmc\_name\_of\_disposition**() translates the PMC row disposition specified in argument *pd* to a human readable name. PMC row dispositions are described in [hwpmc(4)](/hwpmc/4.md).

Function **pmc\_name\_of\_event**() translates the PMC event number specified by argument *pe* to a string. PMC event names are documented in section EVENT SPECIFIERS of [pmc(3)](/pmc/3.md).

Function **pmc\_name\_of\_mode**() translates the PMC mode specified by argument *pm* to a human readable string. PMC modes are described in [pmc(3)](/pmc/3.md).

Function **pmc\_name\_of\_state**() translates the value of argument *ps* to a human readable name.

## IMPLEMENTATION NOTES

The returned pointers point to static storage inside the PMC library and should not be freed by the caller.

## RETURN VALUES

These functions return a non-NULL pointer on successful completion. In case of an error, a NULL pointer is returned and the global variable *errno* is set to indicate the error.

## ERRORS

A call to these functions may fail with the following errors:

- \[EINVAL\]

  The function argument specified an invalid value.

## SEE ALSO

[pmc(3)](/pmc/3.md), [pmc\_cpuinfo(3)](/pmc_cpuinfo/3.md), [pmc\_pmcinfo(3)](/pmc_pmcinfo/3.md), [hwpmc(4)](/hwpmc/4.md)
