QmcContext(3) — Linux manual page

NAME | C++ SYNOPSIS | DESCRIPTION | CONSTRUCTORS | DESCRIPTOR LOOKUP | DIAGNOSTICS | SEE ALSO | COLOPHON

QMCCONTEXT(3)           Library Functions Manual           QMCCONTEXT(3)

NAME         top

       QmcContext - container for a PMAPI context and its metrics

C++ SYNOPSIS         top

       #include <QmcContext.h>

       c++ ... -lpcp_qmc -lpcp

DESCRIPTION         top

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

CONSTRUCTORS         top

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

DESCRIPTOR LOOKUP         top

       The metric and instance domain descriptors are cached by the
       QmcContext object to reduce duplicate QmcDesc(3) and QmcIndom(3)
       objects and PMAPI(3) calls required to create them.  Also the
       mapping from metrics names to pmIDs is also maintained to avoid
       pmLookupName(3) calls.

       int lookupDesc(const char *name, pmID& id);
           Search for the metric name in the name list and set id to the
           known pmID.  If not found, use pmLookupName(3) to get the
           mapping.  If this call fails, the PMAPI(3) error code will be
           returned.

       int lookupDesc(const char *name, uint_t& desc, uint_t& indom);
           Find the index desc and indom to the QmcDesc object and the
           QmcIndom object for the metric name.  The indexes can then be
           used with QmcContext::desc and QmcContext::indom to obtain
           references to the real objects.  The methods will return a
           PMAPI(3) error code if the metric descriptor or instance
           domain could not be obtained.

       int lookupDesc(pmID pmid, uint_t& desc, uint_t& indom);
           Find the index desc and indom to the QmcDesc object and the
           QmcIndom object for the metric pmid.  The indexes can then be
           used with QmcContext::desc and QmcContext::indom to obtain
           references to the real objects.  The methods will return a
           PMAPI(3) error code if the metric descriptor or instance
           domain could not be obtained.

DIAGNOSTICS         top

       Error messages are generated using pmprintf(3) but are not
       flushed. It is the responsibility of the user to call pmflush(3)
       to output any messages.

       Additional diagnostics may be activated by adding the options pmc
       and/or optfetch to the global debugging specification, as
       described in pmSetDebug(3).

SEE ALSO         top

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

COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at 
       ⟨http://www.pcp.io/⟩.  If you have a bug report for this manual
       page, send it to pcp@groups.io.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/performancecopilot/pcp.git⟩ on 2024-06-14.
       (At that time, the date of the most recent commit that was found
       in the repository was 2024-06-14.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

Performance Co-Pilot               SGI                     QMCCONTEXT(3)

Pages that refer to this page: QMC(3)QmcGroup(3)QmcIndom(3)QmcMetric(3)QmcSource(3)