Man Linux: Main Page and Category List

NAME

       libpfm_i386_p6 - support for Intel P6 processor family

SYNOPSIS

       #include <perfmon/pfmlib.h>
       #include <perfmon/pfmlib_i386_p6.h>

DESCRIPTION

       The  libpfm  library provides full support for the P6 processor family,
       including  the  Pentium  M  processor.  The  interface  is  defined  in
       pfmlib_i386_p6.h.  It  consists  of  a  set of functions and structures
       which describe and allow access  to  the  P6  processors  specific  PMU
       features.

       When   P6   processor   specific  features  are  needed  to  support  a
       measurement, their descriptions must be passed as model-specific  input
       arguments  to  the pfm_dispatch_events call. The P6 processors specific
       input  arguments  are  described  in  the  pfmlib_i386_p6_input_param_t
       structure  and  the output parameters in pfmlib_i386_p6_output_param_t.
       They are defined as follows:

       typedef struct {
            unsigned int   cnt_mask;
            unsigned int   flags;
       } pfmlib_i386_p6_counter_t;

       typedef struct {
            pfmlib_i386_p6_counter_t pfp_i386_p6_counters[PMU_I386_P6_NUM_COUNTERS];
            uint64_t            reserved[4];
       } pfmlib_i386_p6_input_param_t;

       typedef struct {
            uint64_t  reserved[8];
       } pfmlib_i386_p6_output_param_t;

       The P6 processor provides  a  few  additional  per-event  features  for
       counters:  thresholding,  inversion,  edge  detection.  They can be set
       using the pfp_i386_p6_counters data  structure  for  each  event.   The
       flags field can be initialized as follows:

       PFMLIB_I386_P6_SEL_INV
              Inverse the results of the cnt_mask comparison when set

       PFMLIB_I386_P6_SEL_EDGE
              Enables edge detection of events.

       The  cnt_mask  field  contains is used to set the event threshold.  The
       value of the counter is incremented each time the number of occurrences
       per  cycle  of the event is greater or equal to the value of the field.
       When zero all occurrences are counted.

Handling of Pentium M

       The library provides full support for the  Pentium  M  PMU.  A  Pentium
       implements  more  events  than  a  generic  P6  processor.  The library
       autodetects the host processor and can distinguish generic P6 processor
       from a Pentium. Thus no special call is needed.

ERRORS

       Refer to the description of pfm_dispatch_events() for errors.

SEE ALSO

       pfm_dispatch_events(3) and set of examples shipped with the library

AUTHOR

       Stephane Eranian <eranian@hpl.hp.com>

                                September, 2005                      LIBPFM(3)