1QMC_CONTEXT(3)             Library Functions Manual             QMC_CONTEXT(3)
2
3
4

NAME

6       QmcContext - container for a PMAPI context and its metrics
7

C++ SYNOPSIS

9       #include <QmcContext.h>
10
11       CC ... -lqmc -lpcp
12

DESCRIPTION

14       A  QmcContext object is a container for a single PMAPI(3) context.  The
15       object maintains a  list  of  all  the  metric  descriptors  (QmcDesc),
16       instance  domains  (QmcIndom) and metrics (QmcMetric) using the context
17       to minimize the duplication of these objects.
18

CONSTRUCTORS

20       A QmcContext object should be  constructed  through  the  QmcGroup::use
21       interface.
22

DESCRIPTOR LOOKUP

24       The metric and instance domain descriptors are cached by the QmcContext
25       object to reduce  duplicate  QmcDesc(3)  and  QmcIndom(3)  objects  and
26       PMAPI(3)  calls required to create them.  Also the mapping from metrics
27       names to pmIDs is also maintained to avoid pmLookupName(3) calls.
28
29       int lookupDesc(const char *name, pmID& id);
30           Search for the metric name in the name list and set id to the known
31           pmID.   If  not  found, use pmLookupName(3) to get the mapping.  If
32           this call fails, the PMAPI(3) error code will be returned.
33
34       int lookupDesc(const char *name, uint_t& desc, uint_t& indom);
35           Find the index desc and indom to the QmcDesc object and the  QmcIn‐
36           dom  object for the metric name.  The indexes can then be used with
37           QmcContext::desc and QmcContext::indom to obtain references to  the
38           real objects.  The methods will return a PMAPI(3) error code if the
39           metric descriptor or instance domain could not be obtained.
40
41       int lookupDesc(pmID pmid, uint_t& desc, uint_t& indom);
42           Find the index desc and indom to the QmcDesc object and the  QmcIn‐
43           dom  object for the metric pmid.  The indexes can then be used with
44           QmcContext::desc and QmcContext::indom to obtain references to  the
45           real objects.  The methods will return a PMAPI(3) error code if the
46           metric descriptor or instance domain could not be obtained.
47

SEE ALSO

49       PMAPI(3), QMC(3), QmcDesc(3), QmcGroup(3),  QmcIndom(3),  QmcMetric(3),
50       pmflush(3), pmLookupName(3) and pmprintf(3).
51

DIAGNOSTICS

53       Error  messages are generated using pmprintf(3) but are not flushed. It
54       is the responsibility of the user to call pmflush(3) to output any mes‐
55       sages.
56
57       Additional  diagnostics  may  be  activated by adding DBG_TRACE_PMC and
58       DBG_TRACE_OPTFETCH to the global pmDebug.
59
60
61
62Performance Co-Pilot                  SGI                       QMC_CONTEXT(3)
Impressum