NAME | C SYNOPSIS | DESCRIPTION | DIAGNOSTICS | SEE ALSO | COLOPHON |
|
|
PMSETDEBUG(3) Library Functions Manual PMSETDEBUG(3)
pmSetDebug, pmDebug, pmGetDebug, pmClearDebug - manipulate PCP debugging control options
#include <pcp/pmapi.h> int pmSetDebug(const char *spec); int pmDebug(const char *spec); char *pmGetDebug(void); int pmClearDebug(const char *spec); cc ... -lpcp
Within the libraries and applications of the Performance Co-Pilot (PCP) there is an extensive set of debugging options that may be enabled or disabled at run-time. pmSetDebug, pmDebug and pmClearDebug all parse spec assuming it to be a comma separated list of PCP debug option names. The names of the available options may be found using the -l argu‐ ment to pmdbg(1). As a special case, the name ``all'' is treated as a synonym for identifying all option names. pmSetDebug will set the corresponding options, while pmClearDebug will clear the corresponding options. pmDebug is used to test if options have been set and returns 1 if at least one of the options in spec has been set, else it returns 0. Consecutive calls to either pmSetDebug or pmClearDebug will be ad‐ ditive. For example the following code fragments are equivalent in terms of the final state of the debug options. sts = pmClearDebug("all"); sts = pmSetDebug("appl0"); sts = pmSetDebug("pdu,fetch"); sts = pmSetDebug("fetch,profile,context"); sts = pmClearDebug("appl0"); sts = pmClearDebug("all"); sts = pmSetDebug("pdu,fetch,profile,context"); For applications that use pmGetOptions(3) to process command line options and arguments, setting the environment variable $PCP_DEBUG provides an alternative mechanism to set debug flags, as described in PCPIntro(1). pmGetDebug returns the current set of enabled debug options as a a comma separated list. If no options are set then the result is an empty string. If every option is set then the result is ``all''. The result is allocated by malloc(3) and the caller is responsible for calling free(3) when the result is no longer needed.
If successful, the routines pmSetDebug, pmDebug and pmClearDebug return 0 or 1, otherwise the return is PM_ERR_CONV to indicate an error parsing spec. For pmGetDebug a return value of NULL indicates a malloc(3) fail‐ ure.
PCPIntro(1), pmdbg(1), free(3) and malloc(3).
This page is part of the PCP (Performance Co-Pilot) project. In‐
formation about the project can be found at ⟨http://www.pcp.io/⟩.
If you have a bug report for this manual page, send it to
[email protected]. This page was obtained from the project's upstream
Git repository ⟨https://github.com/performancecopilot/pcp.git⟩ on
2025-08-11. (At that time, the date of the most recent commit
that was found in the repository was 2025-08-11.) If you discover
any rendering problems in this HTML version of the page, or you
believe there is a better or more up-to-date source for the page,
or you have corrections or improvements to the information in this
COLOPHON (which is not part of the original manual page), send a
mail to [email protected]
Performance Co-Pilot PCP PMSETDEBUG(3)
Pages that refer to this page: pmdbg(1), pmdaconnect(3), pmgetoptions(3), QMC(3), QmcContext(3), QmcDesc(3), QmcGroup(3), QmcIndom(3), QmcMetric(3), QmcSource(3)