1LIBPFM(3)                  Linux Programmer's Manual                 LIBPFM(3)
2
3
4

NAME

6       libpfm_core - support for Intel Core processor family
7

SYNOPSIS

9       #include <perfmon/pfmlib.h>
10       #include <perfmon/pfmlib_core.h>
11
12

DESCRIPTION

14       The  libpfm  library provides full support for the Intel Core processor
15       family, including the Core 2 Duo series. The interface  is  defined  in
16       pfmlib_core.h.  It  consists of a set of functions and structures which
17       describe and allow access to the Intel  Core  processors  specific  PMU
18       features.
19
20       When  Intel  Core  processor  specific features are needed to support a
21       measurement, their descriptions must be passed as model-specific  input
22       arguments to the pfm_dispatch_events call. The Intel Core
23        processors   specific  input  arguments  are  described  in  the  pfm‐
24       lib_core_input_param_t structure and  the  output  parameters  in  pfm‐
25       lib_core_output_param_t. They are defined as follows:
26
27       typedef struct {
28            unsigned int   cnt_mask;
29            unsigned int   flags;
30       } pfmlib_core_counter_t;
31
32       typedef struct {
33            unsigned int pebs_used;
34       } pfmlib_core_pebs_t;
35
36       typedef struct {
37            pfmlib_core_counter_t    pfp_core_counters[PMU_CORE_NUM_COUNTERS];
38            pfmlib_core_pebs_t  pfp_core_pebs;
39            uint64_t       reserved[4];
40       } pfmlib_core_input_param_t;
41
42       typedef struct {
43            uint64_t  reserved[8];
44       } pfmlib_core_output_param_t;
45
46
47       The  Intel  Core processor provides a few additional per-event features
48       for counters: thresholding, inversion, edge detection. They can be  set
49       using  the  pfp_core_counters data structure for each event.  The flags
50       field can be initialized as follows:
51
52       PFMLIB_CORE_SEL_INV
53              Inverse the results of the cnt_mask comparison when set
54
55       PFMLIB_CORE_SEL_EDGE
56              Enables edge detection of events.
57
58       The cnt_mask field contains is used to set the  event  threshold.   The
59       value of the counter is incremented each time the number of occurrences
60       per cycle of the event is greater or equal to the value of  the  field.
61       When zero all occurrences are counted.
62
63

Support for Precise-Event Based Sampling (PEBS)

65       The  library can be used to setup the PMC registers when using PEBS. In
66       this case, the pfp_core_pebs structure must be used and  the  pebs_used
67       field must be set to 1. When using PEBS, it is not possible to use more
68       than one event.
69

Support for Intel Core 2 Duo processors

71       The Intel Core 2 Duo processors are based  on  the  Intel  Core  micro-
72       architecture.   They  implement  the  Intel  architectural PMU and some
73       extensions such as PEBS.  They support all the architectural events and
74       a  lot  more Core 2 specific events.  The library auto-detects the pro‐
75       cessor and provides access to Core 2 events whenever possible.
76

ERRORS

78       Refer to the description of pfm_dispatch_events() for errors.
79

SEE ALSO

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

AUTHOR

84       Stephane Eranian <eranian@hpl.hp.com>
85
86                                November, 2006                       LIBPFM(3)
Impressum