pmc_name_of_capability(3)

pmc_name_of_capability3

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

Usage

#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);

Library

library “libpmc”

Overview

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).

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).

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).

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).

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).

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).

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.

Releases

49 releases since FreeBSD 6.0-RELEASE; the text changed 33 times.

  1. 6.0
  2. 6.1–6.3
  3. 6.4
  4. 7.0
  5. 7.1
  6. 7.2
  7. 7.3
  8. 7.4
  9. 8.0
  10. 8.1
  11. 8.2
  12. 8.3
  13. 8.4
  14. 9.0
  15. 9.1
  16. 9.2
  17. 9.3
  18. 10.0
  19. 10.1
  20. 10.2
  21. 10.3
  22. 10.4
  23. 11.0
  24. 11.1
  25. 11.2
  26. 11.3
  27. 11.4
  28. 12.0
  29. 12.1
  30. 12.2
  31. 12.3
  32. 12.4
  33. 13.0–13.2
  34. 13.3–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.