PMC_EVENT_NAMES_OF_CLASS(3)
π PMC_EVENT_NAMES_OF_CLASS π
okay so bestie, welcome to PMC_EVENT_NAMES_OF_CLASS(3) β straight out of the Library Functions Manual, and she is serving hardware event realness, no cap. this is a libpmc girly and she's about to hand you a whole list of event names. let's get into it β¨
πΈ NAME πΈ
pmc_event_names_of_class β return a list of event names supported by a PMC class
like, she literally goes and fetches the event names for you. main character energy fr fr π
π¦ LIBRARY π¦
Performance Counters Library (libpmc, -lpmc)
that's the vibe check: you're linking against -lpmc. periodt. π
β¨ SYNOPSIS β¨
#include <pmc.h>
int
pmc_event_names_of_class(enum pmc_class cl, const char ***eventnames,
int *nevents);
copy it exactly, bestie, character for character β this is not the moment to freestyle π
π DESCRIPTION π
so the function pmc_event_names_of_class() retrieves the hardware event names supported by the class of PMC hardware specified by argument cl. iconic behavior honestly.
it returns an array of const char * pointers to names of events supported by the specified class of PMC hardware. the location pointed to by argument nevents is set to the number of event names returned. so like, she tells you what the names are and how many there are. thoughtful queen π
the returned array is allocated using malloc(3). so yes, it's yours now β you own that memory, don't just ghost it π«Ά
π₯ RETURN VALUES π₯
the pmc_event_names_of_class() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.
0 = slay. -1 = check errno, bestie, she's trying to tell you something π
π ERRORS π
a call to pmc_event_names_of_class() may fail with the following errors:
[EINVAL]β Argumentclwas invalid. like, that class does not exist, babes π[ENOMEM]β Allocation of a memory area to hold the result failed. the memory said no π
π SEE ALSO π
go read them, iykyk β
and that's the whole page, bestie β no cap, every last detail intact π
mwah π β this iconic little number is brought to you by Debian, dated November 23, 2007, and she still ate. don't forget to free() that array, ily, bye ππ¦β¨
π¦ 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