PMC_NAME_OF_CAPABILITY(3)
π
PMC_NAME_OF_CAPABILITY(3) β human readable names for numeric constants used by pmc(3) and hwpmc(4)
okay so this page is from the Library Functions Manual, and it is giving βbestie, what does this number even mean?β energy. Itβs all about the little converter functions in libpmc that turn numeric constants into strings you can actually read. no cap, they are useful. π
β¨ 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 bypmc(3)andhwpmc(4)
π LIBRARY π
Performance Counters Library (libpmc, -lpmc)
π§ 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 Performance Counters Library (libpmc, -lpmc) to const char * pointers to human readable representations of their arguments. Basically theyβre the translators, and they ate. π
pmc_name_of_capability()β takes the PMC capability flag given in argumentpcand translates it to a human readable string. PMC capabilities are described inpmc(3). β¨pmc_name_of_class()β translates the PMC class value specified in argumentpcto a human readable name. PMC classes are described inpmc(3). πpmc_name_of_cputype()β translates the CPU type value specified in argumentctto a human readable name. CPU types known to the library are described inpmc(3). π¦pmc_name_of_disposition()β translates the PMC row disposition specified in argumentpdto a human readable name. PMC row dispositions are described inhwpmc(4). πpmc_name_of_event()β translates the PMC event number specified by argumentpeto a string. PMC event names are documented in section βEVENT SPECIFIERSβ ofpmc(3). π₯pmc_name_of_mode()β translates the PMC mode specified by argumentpmto a human readable string. PMC modes are described inpmc(3). πpmc_name_of_state()β translates the value of argumentpsto 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.
bestie, do NOT free() these pointers, okay? They point to static storage inside the PMC library. Not yours to free. π
β 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_cpuinfo(3), pmc_pmcinfo(3), hwpmc(4)
xoxo, your Debian bestie π this page is stamped November 24, 2007, and the footer title is PMC_NAME_OF_CAPABILITY(3). slay. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2007 Joseph Koshy. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms