1PMPARSEDEBUG(3) Library Functions Manual PMPARSEDEBUG(3)
2
3
4
6 __pmParseDebug, __pmSetDebugBits - manipulate old-style PCP debugging
7 control bit-fields
8
10 #include <pcp/pmapi.h>
11 #include <pcp/deprecated.h>
12
13 int __pmParseDebug(const char *spec);
14 void __pmSetDebugBits(int value);
15
16 cc ... -lpcp
17
19 These routine have been deprecated and may be removed in a future Per‐
20 formance Co-Pilot (PCP) release. Please refer to pmSetDebug(3) and
21 pmClearDebug(3) for replacement functionality.
22
23 __pmParseDebug parses spec assuming it to be a comma separated list of
24 PCP debug flags.
25
26 Each flag may be specified as an integer or the trailing portion of the
27 symbolic name of the corresponding flag as reported by pmdbg(1). Sym‐
28 bolic names are stripped of the ``DBG_TRACE_'' prefix and may appear in
29 either case.
30
31 As a special case, the values ``-1'' and ``ALL'' are treated as syn‐
32 onyms for turning on all bits except the sign bit in the result, i.e.
33 INT_MAX from <limits.h>.
34
35 For example the debug option fetch is defined in the output from
36 pmdbg(3) with the -L option and may be specified in spec as 2, FETCH or
37 fetch.
38
39 __pmSetDebugBits may be used to set the bit-fields directly using the
40 encoding in value. The effect is additive, so consecutive calls to
41 __pmSetDebugBits will set the conjunction of the bits in the value
42 arguments. To clear the bit-fields, see pmClearDebug(3).
43
45 pmdbg(1), pmSetDebug(3) and pmClearDebug(3).
46
48 If successful, __pmParseDebug returns the value computed by the bit-
49 wise ``or'' of each flag in the spec, suitable for assigning to the
50 global debug trace control variable pmDebug. Otherwise the return
51 value is less than 0 to indicate a parsing error.
52
53
54
55Performance Co-Pilot PCP PMPARSEDEBUG(3)