Blame src/libpfm-3.y/docs/man3/libpfm_p6.3

Packit 577717
.TH LIBPFM 3  "September, 2005" "" "Linux Programmer's Manual"
Packit 577717
.SH NAME
Packit 577717
libpfm_i386_p6 - support for Intel P6 processor family
Packit 577717
.SH SYNOPSIS
Packit 577717
.nf
Packit 577717
.B #include <perfmon/pfmlib.h>
Packit 577717
.B #include <perfmon/pfmlib_i386_p6.h>
Packit 577717
.sp
Packit 577717
.SH DESCRIPTION
Packit 577717
The libpfm library provides full support for the P6 processor family, including
Packit 577717
the Pentium M processor. The interface is defined in \fBpfmlib_i386_p6.h\fR. It consists
Packit 577717
of a set of functions and structures which describe and allow access to the
Packit 577717
P6 processors specific PMU features.
Packit 577717
.sp
Packit 577717
When P6 processor specific features are needed to support a measurement, their descriptions must be passed
Packit 577717
as model-specific input arguments to the \fBpfm_dispatch_events()\fR function. The P6 processors specific 
Packit 577717
input arguments are described in the \fBpfmlib_i386_p6_input_param_t\fR structure and the output
Packit 577717
parameters in \fBpfmlib_i386_p6_output_param_t\fR. They are defined as follows:
Packit 577717
.sp
Packit 577717
.nf
Packit 577717
typedef struct {
Packit 577717
	unsigned int	cnt_mask;
Packit 577717
	unsigned int	flags;
Packit 577717
} pfmlib_i386_p6_counter_t;
Packit 577717
Packit 577717
typedef struct {
Packit 577717
	pfmlib_i386_p6_counter_t	pfp_i386_p6_counters[PMU_I386_P6_NUM_COUNTERS];
Packit 577717
	uint64_t			reserved[4];
Packit 577717
} pfmlib_i386_p6_input_param_t;
Packit 577717
Packit 577717
typedef struct {
Packit 577717
	uint64_t	reserved[8];
Packit 577717
} pfmlib_i386_p6_output_param_t;
Packit 577717
.fi
Packit 577717
.sp
Packit 577717
.sp
Packit 577717
The P6 processor provides a few additional per-event features for 
Packit 577717
counters: thresholding, inversion, edge detection. They can be set using the 
Packit 577717
\fBpfp_i386_p6_counters\fR data structure for each event.  The \fBflags\fR
Packit 577717
field can be initialized as follows:
Packit 577717
.TP
Packit 577717
.B PFMLIB_I386_P6_SEL_INV
Packit 577717
Inverse the results of the \fBcnt_mask\fR comparison when set
Packit 577717
.TP
Packit 577717
.B PFMLIB_I386_P6_SEL_EDGE
Packit 577717
Enables edge detection of events. 
Packit 577717
.LP
Packit 577717
The \fBcnt_mask\fR field contains is used to set the event threshold.
Packit 577717
The value of the counter is incremented each time the number of occurrences
Packit 577717
per cycle of the event is greater or equal to the value of the field. When
Packit 577717
zero all occurrences are counted.
Packit 577717
.sp
Packit 577717
.SH Handling of Pentium M
Packit 577717
The library provides full support for the Pentium M PMU. A Pentium implements
Packit 577717
more events than a generic P6 processor. The library autodetects the host
Packit 577717
processor and can distinguish generic P6 processor from a Pentium. Thus no
Packit 577717
special call is needed.
Packit 577717
.sp
Packit 577717
.SH ERRORS
Packit 577717
Refer to the description of the \fBpfm_dispatch_events()\fR function for errors.
Packit 577717
.SH SEE ALSO
Packit 577717
pfm_dispatch_events(3) and set of examples shipped with the library
Packit 577717
.SH AUTHOR
Packit 577717
Stephane Eranian <eranian@hpl.hp.com>
Packit 577717
.PP