pfm_get_impl_pmcs,  pfm_get_impl_pmds,  pfm_get_impl_coun­
       ters - return bitmask of implemented PMU registers


SYNOPSIS

       #include <perfmon/pfmlib.h>

       int pfm_get_impl_pmcs(unsigned long impl_pmcs[4]);
       int pfm_get_impl_pmds(unsigned long impl_pmds[4]);
       int pfm_get_impl_counters(unsigned long impl_counts[4]);
       int pfm_get_num_counters(void);


DESCRIPTION

       The first three functions  returns  a  bitmask  indicating
       which  registers are implemented on the host PMU. The num­
       ber of implemented PMU register can vary from  one  imple­
       mentation  of  the architecture to another.  The architec­
       ture requires a certain set of PMU registers to be  imple­
       mented, namely PMC0-PMC7 and PMD4-PMD7 out of a maximum of
       256 PMDs and 256 PMCs.

       This call must be made after the library has been success­
       fully  initialized.   Because a maximum of 256 PMD and 256
       PMC registers can be implemented,  the  functions  use  an
       array of 4 long integers as argument. Each of the 256 bits
       spread across all 4 elements represents one register. Typ­
       ically only the first element of the array is relevant.

       The  pfm_get_impl_pmcs  returns the bitmask of implemented
       PMCS.  The pfm_get_impl_pmds returns the bitmask of imple­
       mented  PMDS.  The pfm_get_impl_counters returns a bitmask
       of the PMD/PMC pairs which can be used  as  counters.  PMU
       registers  can  be  used for very different purposes: con­
       trol, counting, buffers. The counters are used to  accumu­
       late the number of occurrences of events and are typically
       the one used by monitoring tools.  The  architecture  dic­
       tates that at least 4 pairs exist and that they must be in
       PMC4/PMD4 through PMC7/PMD7.  The corresponding  bits  are
       guaranteed to be set in all three returned bitmasks.

       The  pfm_num_counters function returns the number of coun­
       ters implemented by the host PMU. The same results can  be
       obtained by counting the number of bits set in the bitmask
       returned by pfm_get_impl_counters.


RETURN

       The function returns whether or not it was successful.   A
       return  value  of PFMLIB_SUCCESS indicates success, other­
       wise the value is the error code.


ERRORS

       PFMLIB_ERR_NOINIT the library  has  not  been  initialized



AUTHOR

       Stephane Eranian <eranian@hpl.hp.com>


Man(1) output converted with man2html