1PMPARSEDEBUG(3) Library Functions Manual PMPARSEDEBUG(3)
2
3
4
6 __pmParseDebug - convert a list of debug flags into an integer
7
9 #include <pcp/pmapi.h>
10 #include <pcp/impl.h>
11
12 int __pmParseDebug(const char *spec);
13
14 cc ... -lpcp
15
17 __pmParseDebug parses spec assuming it to be a comma separated list of
18 PCP debug flags.
19
20 Each flag may be specified as an integer or the trailing portion of the
21 symbolic name of the corresponding flag as reported by pmdbg(1). Sym‐
22 bolic names are stripped of the ``DBG_TRACE_'' prefix and may appear in
23 either case.
24
25 As a special case, the values ``-1'' and ``ALL'' are treated as syn‐
26 onyms for turning on all bits except the sign bit in the result, i.e.
27 INT_MAX from <limits.h>.
28
29 For example the debug flag DBG_TRACE_FETCH is defined in
30 /usr/include/pcp/impl.h and may be specified in spec as 2, FETCH or
31 fetch.
32
34 pmdbg(1)
35
37 If successful, __pmParseDebug returns the value computed by the bit-
38 wise ``or'' of each flag in the spec, suitable for assigning to the
39 global debug trace control variable pmDebug. Otherwise the return
40 value is less than 0 to indicate a parsing error.
41
42
43
44Performance Co-Pilot PCP PMPARSEDEBUG(3)