1LIBPFM(3) Linux Programmer's Manual LIBPFM(3)
2
3
4
6 libpfm_intel_snb - support for Intel Sandy Bridge core PMU
7
9 #include <perfmon/pfmlib.h>
10
11 PMU name: snb
12 PMU desc: Intel Sandy Bridge
13 PMU name: snb_ep
14 PMU desc: Intel Sandy Bridge EP
15
16
18 The library supports the Intel Sandy Bridge core PMU. It should be
19 noted that this PMU model only covers each core's PMU and not the
20 socket level PMU. For that refer to the Sandy Bridge uncore PMU sup‐
21 port.
22
23 On Sandy Bridge, the number of generic counters depends on the Hyper‐
24 threading (HT) mode. When HT is on, then only 4 generic counters are
25 available. When HT is off, then 8 generic counters are available. The
26 pfm_get_pmu_info() function returns the maximum number of generic coun‐
27 ters in num_cntrs.
28
29
31 The following modifiers are supported on Intel Sandy Bridge processors:
32
33 u Measure at user level which includes privilege levels 1, 2, 3.
34 This corresponds to PFM_PLM3. This is a boolean modifier.
35
36 k Measure at kernel level which includes privilege level 0. This
37 corresponds to PFM_PLM0. This is a boolean modifier.
38
39 i Invert the meaning of the event. The counter will now count cy‐
40 cles in which the event is not occurring. This is a boolean mod‐
41 ifier
42
43 e Enable edge detection, i.e., count only when there is a state
44 transition from no occurrence of the event to at least one oc‐
45 currence. This modifier must be combined with a counter mask
46 modifier (m) with a value greater or equal to one. This is a
47 boolean modifier.
48
49 c Set the counter mask value. The mask acts as a threshold. The
50 counter will count the number of cycles in which the number of
51 occurrences of the event is greater or equal to the threshold.
52 This is an integer modifier with values in the range [0:255].
53
54 t Measure on both threads at the same time assuming hyper-thread‐
55 ing is enabled. This is a boolean modifier.
56
57 ldlat Pass a latency threshold to the MEM_TRANS_RETIRED:LA‐
58 TENCY_ABOVE_THRESHOLD event. This is an integer attribute that
59 must be in the range [1:65535]. It is required for this event.
60 Note that the event must be used with precise sampling (PEBS).
61
62
64 Intel Sandy Bridge provides two offcore_response events, like Intel
65 Westmere. They are called OFFCORE_RESPONSE_0 and OFFCORE_RESPONSE_1.
66
67 Those events need special treatment in the performance monitoring in‐
68 frastructure because each event uses an extra register to store some
69 settings. Thus, in case multiple offcore_response events are monitored
70 simultaneously, the kernel needs to manage the sharing of that extra
71 register.
72
73 The offcore_response events are exposed as a normal events by the li‐
74 brary. The extra settings are exposed as regular umasks. The library
75 takes care of encoding the events according to the underlying kernel
76 interface.
77
78 On Intel Sandy Bridge, the umasks are divided into three categories:
79 request, supplier and snoop. The user must provide at least one umask
80 for each category. The categories are shown in the umask descriptions.
81
82 There is also the special response umask called ANY_RESPONSE. When this
83 umask is used then it overrides any supplier and snoop umasks. In other
84 words, users can specify either ANY_RESPONSE OR any combinations of
85 supplier + snoops.
86
87 In case no supplier or snoop is specified, the library defaults to us‐
88 ing ANY_RESPONSE.
89
90 For instance, the following are valid event selections:
91
92 OFFCORE_RESPONSE_0:DMND_DATA_RD:ANY_RESPONSE
93
94 OFFCORE_RESPONSE_0:ANY_REQUEST
95
96 OFFCORE_RESPONSE_0:ANY_RFO:LLC_HITM:SNOOP_ANY
97
98
99 But the following are illegal:
100
101
102 OFFCORE_RESPONSE_0:ANY_RFO:LLC_HITM:ANY_RESPONSE
103
104 OFFCORE_RESPONSE_0:ANY_RFO:LLC_HITM:SNOOP_ANY:ANY_RESPONSE
105
106
108 libpfm_snb_unc(3)
109
110
112 Stephane Eranian <eranian@gmail.com>
113
114
115
116 January, 2011 LIBPFM(3)