PMPARSEDEBUG(3)
π PMPARSEDEBUG(3) β the library functions girlies π
okay so bestie, welcome to PMPARSEDEBUG(3), living in the Library Functions Manual section of the PCP docs. grab a snack, we're doing bit-fields π
β¨ NAME β¨
__pmParseDebug, __pmSetDebugBits β manipulate old-style PCP debugging control bit-fields π
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
#include <pcp/deprecated.h>
int __pmParseDebug(const char *spec);
void __pmSetDebugBits(int value);
cc ... -lpcp
π¦ DESCRIPTION π¦
ngl, these routines have been deprecated and may be removed in a future Performance Co-Pilot (PCP) release π so please, for your own sake, go look at pmSetDebug(3) and pmClearDebug(3) for the replacement functionality. they're the glow-up versions, fr fr.
__pmParseDebug parses spec, and it's assuming that thing is a comma separated list of PCP debug flags. like a lil roster of flags, one after another π
each flag can be given as either an integer, or as the trailing portion of the symbolic name of the corresponding flag, exactly as reported by pmdbg(1). the symbolic names get stripped of the `DBG_TRACE_` prefix, and they can show up in either case β uppercase, lowercase, doesn't matter, it ate both ways π
special case alert π¨ the values `-1` and `ALL` are treated as synonyms for turning on all bits except the sign bit in the result, i.e. INT_MAX from <limits.h>. iconic behaviour honestly.
for example: the debug option fetch is defined in the output from pmdbg(3) with the -L option, and it may be specified in spec as 2, FETCH or fetch. three ways, same vibe β¨
__pmSetDebugBits lets you set the bit-fields directly using the encoding in value. and listen, the effect is additive, so consecutive calls to __pmSetDebugBits will set the conjunction of the bits in the value arguments. they stack, bestie π and if you wanna clear the bit-fields instead? see pmClearDebug(3) π§
π DIAGNOSTICS π
if it slays (i.e. succeeds), __pmParseDebug returns the value computed by the bit-wise `or` of each flag in the spec β perfect for assigning to the global debug trace control variable pmDebug π
otherwise the return value is less than 0, which is the code's way of saying "parsing error, girl" π
π«Ά SEE ALSO π«Ά
pmdbg(1), pmSetDebug(3) and pmClearDebug(3).
and that's the whole page, no cap π this one came to you from Performance Co-Pilot (PCP), filed under PMPARSEDEBUG(3) β go drink some water and clear your debug bits, ily ππ¦πΈ
π¦ where this page comes from
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: libpcp3-dev 6.3.8-1
- ubuntu questing: libpcp3-dev 6.3.8-1
- Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms