1LIBPFM(3) Linux Programmer's Manual LIBPFM(3)
2
3
4
6 libpfm_core - support for Intel Atom processor family
7
9 #include <perfmon/pfmlib.h>
10 #include <perfmon/pfmlib_intel_atom.h>
11
12
14 The libpfm library provides full support for the Intel Atom processor.
15 This processor implements Intel architectural perfmon v3 with Precise
16 Event-Based Sampling (PEBS) support. It also implements all architected
17 events to which it adds lots of Atom specific events.
18
19 The libpfm interface is defined in pfmlib_intel_atom.h. It consists of
20 a set of functions and structures which describe and allow access to
21 the Intel Atom processor specific PMU features.
22
23 When Intel Atom processor specific features are needed to support a
24 measurement, their descriptions must be passed as model-specific input
25 arguments to the pfm_dispatch_events() function. The Intel Atom proces‐
26 sors specific input arguments are described in the pfm‐
27 lib_intel_atom_input_param_t structure. No output parameters are cur‐
28 rently defined. The input parameters are defined as follows:
29
30 typedef struct {
31 unsigned int cnt_mask;
32 unsigned int flags;
33 } pfmlib_intel_atom_counter_t;
34
35 typedef struct {
36 pfmlib_intel_atom_counter_t pfp_intel_atom_counters[PMU_INTEL_ATOM_NUM_COUNTERS];
37 unsigned int pfp_intel_atom_pebs_used;
38 uint64_t reserved[4];
39 } pfmlib_core_input_param_t;
40
41
42 The Intel Atom processor provides several additional per-event features
43 for counters: thresholding, inversion, edge detection, monitoring both
44 threads. They can be set using the pfp_intel_atom_counters data struc‐
45 ture for each event. The flags field can be initialized with any com‐
46 binations of the following values:
47
48 PFMLIB_INTEL_ATOM_SEL_INV
49 Inverse the results of the cnt_mask comparison when set
50
51 PFMLIB_INTEL_ATOM_SEL_EDGE
52 Enable edge detection of events.
53
54 PFMLIB_INTEL_ATOM_SEL_ANYTHR
55 Enable measuring the event in any of the two threads. By default
56 only the current thread is measured.
57
58 The cnt_mask field is used to set the event threshold. The value of
59 the counter is incremented each time the number of occurrences per
60 cycle of the event is greater or equal to the value of the field. Thus
61 the event is modified to actually measure the number of qualifying
62 cycles. When zero all occurrences are counted (this is the default).
63
64
66 The library can be used to setup the PMC registers when using PEBS. In
67 this case, the pfp_intel_atom_pebs_used field must be set to 1. When
68 using PEBS, it is not possible to use more than one event.
69
71 Refer to the description of the pfm_dispatch_events() function for
72 errors.
73
75 pfm_dispatch_events(3) and set of examples shipped with the library
76
78 Stephane Eranian <eranian@gmail.com>
79
80 November, 2006 LIBPFM(3)