1QMCCONTEXT(3)              Library Functions Manual              QMCCONTEXT(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),  in‐
16       stance  domains (QmcIndom) and metrics (QmcMetric) using the context to
17       minimize the duplication of these objects.
18

CONSTRUCTORS

20       A QmcContext object should be constructed through the QmcGroup::use in‐
21       terface.
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

DIAGNOSTICS

49       Error messages are generated using pmprintf(3) but are not flushed.  It
50       is the responsibility of the user to call pmflush(3) to output any mes‐
51       sages.
52
53       Additional diagnostics may be  activated  by  adding  the  options  pmc
54       and/or  optfetch to the global debugging specification, as described in
55       pmSetDebug(3).
56

SEE ALSO

58       PMAPI(3), QMC(3), QmcDesc(3), QmcGroup(3),  QmcIndom(3),  QmcMetric(3),
59       pmflush(3), pmLookupName(3) and pmprintf(3).
60
61
62
63Performance Co-Pilot                  SGI                        QMCCONTEXT(3)
Impressum