NAME
libpfm_x86_64 - support for AMD64 processors
SYNOPSIS
#include <perfmon/pfmlib.h>
#include <perfmon/pfmlib_amd64.h>
DESCRIPTION
The libpfm library provides full support for the AMD64 processor family 15 and 16 when
running in either 32 or 64 bit mode. The interface is defined in pfmlib_amd64.h. It consists
of a set of functions and structures which describe and allow access to the
AMD64 PMU features. Note that it does not support Intel EM64T processors.
When AMD64 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 AMD64 processor-specific
input arguments are described in the pfmlib_amd64_input_param_t structure and the output
parameters in pfmlib_amd64_output_param_t. They are defined as follows:
typedef struct {
unsigned int cnt_mask;
unsigned int flags;
} pfmlib_amd64_counter_t;
typedef struct {
pfmlib_amd64_counter_t pfp_amd64_counters[PMU_GEN_X86_64_NUM_COUNTERS];
uint64_t reserved[4];
} pfmlib_amd64_input_param_t;
typedef struct {
uint64_t reserved[8];
} pfmlib_amd64_output_param_t;
The X86-64 processor provides a few additional per-event features for
counters: thresholding, inversion, edge detection. They can be set using the
pfp_amd64_counters data structure for each event. The flags
field can be initialized as follows:
- PFMLIB_AMD64_SEL_INV: Inverse the results of the cnt_mask comparison when set
- PFMLIB_AMD64_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.
ERRORS
Refer to the description of pfm_dispatch_events() for errors.
SEE ALSO
pfm_dispatch_events() and set of examples shipped with the library
AUTHOR
Stephane Eranian
This document was created by man2html, using the manual pages.
Time: 16:57:22 GMT, October 27, 2007
|