|
Packit |
577717 |
.TH LIBPFM 3 "November, 2006" "" "Linux Programmer's Manual"
|
|
Packit |
577717 |
.SH NAME
|
|
Packit |
577717 |
libpfm_core - support for Intel Atom processor family
|
|
Packit |
577717 |
.SH SYNOPSIS
|
|
Packit |
577717 |
.nf
|
|
Packit |
577717 |
.B #include <perfmon/pfmlib.h>
|
|
Packit |
577717 |
.B #include <perfmon/pfmlib_intel_atom.h>
|
|
Packit |
577717 |
.sp
|
|
Packit |
577717 |
.SH DESCRIPTION
|
|
Packit |
577717 |
The libpfm library provides full support for the Intel Atom processor. This
|
|
Packit |
577717 |
processor implements Intel architectural perfmon v3 with Precise Event-Based
|
|
Packit |
577717 |
Sampling (PEBS) support. It also implements all architected events to which
|
|
Packit |
577717 |
it adds lots of Atom specific events.
|
|
Packit |
577717 |
.sp
|
|
Packit |
577717 |
The libpfm interface is defined in \fBpfmlib_intel_atom.h\fR. It consists
|
|
Packit |
577717 |
of a set of functions and structures which describe and allow access to the
|
|
Packit |
577717 |
Intel Atom processor specific PMU features.
|
|
Packit |
577717 |
.sp
|
|
Packit |
577717 |
When Intel Atom processor specific features are needed to support a measurement, their descriptions
|
|
Packit |
577717 |
must be passed as model-specific input arguments to the \fBpfm_dispatch_events()\fR function. The Intel
|
|
Packit |
577717 |
Atom processors specific input arguments are described in the \fBpfmlib_intel_atom_input_param_t\fR structure.
|
|
Packit |
577717 |
No output parameters are currently defined. The input parameters 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_intel_atom_counter_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
typedef struct {
|
|
Packit |
577717 |
pfmlib_intel_atom_counter_t pfp_intel_atom_counters[PMU_INTEL_ATOM_NUM_COUNTERS];
|
|
Packit |
577717 |
unsigned int pfp_intel_atom_pebs_used;
|
|
Packit |
577717 |
uint64_t reserved[4];
|
|
Packit |
577717 |
} pfmlib_core_input_param_t;
|
|
Packit |
577717 |
.fi
|
|
Packit |
577717 |
.sp
|
|
Packit |
577717 |
.sp
|
|
Packit |
577717 |
The Intel Atom processor provides several additional per-event features for
|
|
Packit |
577717 |
counters: thresholding, inversion, edge detection, monitoring both threads. They
|
|
Packit |
577717 |
can be set using the \fBpfp_intel_atom_counters\fR data structure for each event.
|
|
Packit |
577717 |
The \fBflags\fR field can be initialized with any combinations of the following
|
|
Packit |
577717 |
values:
|
|
Packit |
577717 |
.TP
|
|
Packit |
577717 |
.B PFMLIB_INTEL_ATOM_SEL_INV
|
|
Packit |
577717 |
Inverse the results of the \fBcnt_mask\fR comparison when set
|
|
Packit |
577717 |
.TP
|
|
Packit |
577717 |
.B PFMLIB_INTEL_ATOM_SEL_EDGE
|
|
Packit |
577717 |
Enable edge detection of events.
|
|
Packit |
577717 |
.TP
|
|
Packit |
577717 |
.B PFMLIB_INTEL_ATOM_SEL_ANYTHR
|
|
Packit |
577717 |
Enable measuring the event in any of the two threads. By default only the current thread is measured.
|
|
Packit |
577717 |
.LP
|
|
Packit |
577717 |
The \fBcnt_mask\fR field 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.
|
|
Packit |
577717 |
Thus the event is modified to actually measure the number of qualifying cycles.
|
|
Packit |
577717 |
When zero all occurrences are counted (this is the default).
|
|
Packit |
577717 |
.sp
|
|
Packit |
577717 |
.SH Support for Precise-Event Based Sampling (PEBS)
|
|
Packit |
577717 |
The library can be used to setup the PMC registers when using PEBS. In this case,
|
|
Packit |
577717 |
the \fBpfp_intel_atom_pebs_used\fR field must be set to 1. When using PEBS, it is
|
|
Packit |
577717 |
not possible to use more than one event.
|
|
Packit |
577717 |
.LP
|
|
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@gmail.com>
|
|
Packit |
577717 |
.PP
|