1LIBPFM(3) Linux Programmer's Manual LIBPFM(3)
2
3
4
6 libpfm_i386_p6 - support for Intel P6 processor family
7
9 #include <perfmon/pfmlib.h>
10 #include <perfmon/pfmlib_i386_p6.h>
11
12
14 The libpfm library provides full support for the P6 processor family,
15 including the Pentium M processor. The interface is defined in pfm‐
16 lib_i386_p6.h. It consists of a set of functions and structures which
17 describe and allow access to the P6 processors specific PMU features.
18
19 When P6 processor specific features are needed to support a measure‐
20 ment, their descriptions must be passed as model-specific input argu‐
21 ments to the pfm_dispatch_events call. The P6 processors specific input
22 arguments are described in the pfmlib_i386_p6_input_param_t structure
23 and the output parameters in pfmlib_i386_p6_output_param_t. They are
24 defined as follows:
25
26 typedef struct {
27 unsigned int cnt_mask;
28 unsigned int flags;
29 } pfmlib_i386_p6_counter_t;
30
31 typedef struct {
32 pfmlib_i386_p6_counter_t pfp_i386_p6_counters[PMU_I386_P6_NUM_COUNTERS];
33 uint64_t reserved[4];
34 } pfmlib_i386_p6_input_param_t;
35
36 typedef struct {
37 uint64_t reserved[8];
38 } pfmlib_i386_p6_output_param_t;
39
40
41 The P6 processor provides a few additional per-event features for coun‐
42 ters: thresholding, inversion, edge detection. They can be set using
43 the pfp_i386_p6_counters data structure for each event. The flags
44 field can be initialized as follows:
45
46 PFMLIB_I386_P6_SEL_INV
47 Inverse the results of the cnt_mask comparison when set
48
49 PFMLIB_I386_P6_SEL_EDGE
50 Enables edge detection of events.
51
52 The cnt_mask field contains is used to set the event threshold. The
53 value of the counter is incremented each time the number of occurrences
54 per cycle of the event is greater or equal to the value of the field.
55 When zero all occurrences are counted.
56
57
59 The library provides full support for the Pentium M PMU. A Pentium
60 implements more events than a generic P6 processor. The library autode‐
61 tects the host processor and can distinguish generic P6 processor from
62 a Pentium. Thus no special call is needed.
63
64
66 Refer to the description of pfm_dispatch_events() for errors.
67
69 pfm_dispatch_events(3) and set of examples shipped with the library
70
72 Stephane Eranian <eranian@hpl.hp.com>
73
74 September, 2005 LIBPFM(3)