|
NAMEpmc_allocate , pmc_release
—
allocate and free performance monitoring counters
LIBRARYPerformance Counters Library (libpmc, -lpmc)SYNOPSIS#include <pmc.h>
int
int
DESCRIPTIONFunctionpmc_allocate () allocates a performance
monitoring counter that measures the events named by argument
eventspecifier, and writes the allocated handle to the
location pointed to by argument pmcid.
Argument eventspecifier comprises an PMC event name followed by an optional comma separated list of keywords and qualifiers. The allowed syntax for argument eventspecifier is processor specific and is listed in section EVENT SPECIFIERS in the pmc(3) manual page. The desired PMC mode is specified by argument mode. Legal values for the mode argument are:
Mode specific modifiers may be specified using argument flags. The flags supported at PMC allocation time are:
PMC_F_LOG_PROCCSW and
PMC_F_LOG_PROCEXIT need a log file to be configured
before they are started.
For system scope PMCs, the argument cpu is a
non-negative value that specifies the CPU number that the PMC is to be
allocated on. Process scope PMC allocations should specify the constant
The count argument behaves identically to the pmc_set(3) function's value argument. For counting PMCs, count specifies the initial value of the allocated PMC. For sampling PMCs, count specifies the reload count. Function RETURN VALUESIf successful, functionpmc_allocate () sets the location
specified by argument pmcid to the handle of the
allocated PMC and returns 0. In case of an error, the function returns -1 and
sets the global variable errno to indicate the error.
ERRORS
SEE ALSOpmc(3), pmc_attach(3), pmc_configure_logfile(3), pmc_start(3), hwpmc(4)
Visit the GSP FreeBSD Man Page Interface. |