]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libpmc/pmc.sandybridge.3
pmc(3): mandoc clean ups
[FreeBSD/FreeBSD.git] / lib / libpmc / pmc.sandybridge.3
1 .\" Copyright (c) 2012 Davide Italiano <davide@FreeBSD.org>  
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd October 19, 2012
28 .Dt PMC.SANDYBRIDGE 3
29 .Os
30 .Sh NAME
31 .Nm pmc.sandybridge
32 .Nd measurement events for
33 .Tn Intel
34 .Tn Sandy Bridge
35 family CPUs
36 .Sh LIBRARY
37 .Lb libpmc
38 .Sh SYNOPSIS
39 .In pmc.h
40 .Sh DESCRIPTION
41 .Tn Intel
42 .Tn "Sandy Bridge"
43 CPUs contain PMCs conforming to the version 3 of the
44 .Tn Intel
45 performance measurement architecture.
46 These CPUs may contain up to three classes of PMCs:
47 .Bl -tag -width "Li PMC_CLASS_IAP"
48 .It Li PMC_CLASS_IAF
49 Fixed-function counters that count only one hardware event per counter.
50 .It Li PMC_CLASS_IAP
51 Programmable counters that may be configured to count one of a defined
52 set of hardware events.
53 .It Li PMC_CLASS_TSC
54 These PMCs are documented in
55 .Xr pmc.tsc 3 .
56 .El
57 .Pp
58 The number of PMCs available in each class and their widths need to be
59 determined at run time by calling
60 .Xr pmc_cpuinfo 3 .
61 .Pp
62 Intel Sandy Bridge PMCs are documented in
63 .Rs
64 .%B "Intel(R) 64 and IA-32 Architectures Software Developers Manual"
65 .%T "Volume 3B: System Programming Guide, Part 2"
66 .%N "Order Number: 253669-039US"
67 .%D May 2011
68 .%Q "Intel Corporation"
69 .Re
70 .Ss SANDY BRIDGE FIXED FUNCTION PMCS
71 These PMCs and their supported events are documented in
72 .Xr pmc.iaf 3 .
73 .Ss SANDY BRIDGE PROGRAMMABLE PMCS
74 The programmable PMCs support the following capabilities:
75 .Bl -column "PMC_CAP_INTERRUPT" "Support"
76 .It Em Capability Ta Em Support
77 .It PMC_CAP_CASCADE Ta \&No
78 .It PMC_CAP_EDGE Ta Yes
79 .It PMC_CAP_INTERRUPT Ta Yes
80 .It PMC_CAP_INVERT Ta Yes
81 .It PMC_CAP_READ Ta Yes
82 .It PMC_CAP_PRECISE Ta \&No
83 .It PMC_CAP_SYSTEM Ta Yes
84 .It PMC_CAP_TAGGING Ta \&No
85 .It PMC_CAP_THRESHOLD Ta Yes
86 .It PMC_CAP_USER Ta Yes
87 .It PMC_CAP_WRITE Ta Yes
88 .El
89 .Ss Event Qualifiers
90 Event specifiers for these PMCs support the following common
91 qualifiers:
92 .Bl -tag -width indent
93 .It Li rsp= Ns Ar value
94 Configure the Off-core Response bits.
95 .Bl -tag -width indent
96 .It Li REQ_DMND_DATA_RD
97 Counts the number of demand and DCU prefetch data reads of full and partial
98 cachelines as well as demand data page table entry cacheline reads.
99 Does not count L2 data read prefetches or instruction fetches.
100 .It Li REQ_DMND_RFO
101 Counts the number of demand and DCU prefetch reads for ownership (RFO)
102 requests generated by a write to data cacheline.
103 Does not count L2 RFO prefetches.
104 .It Li REQ_DMND_IFETCH
105 Counts the number of demand and DCU prefetch instruction cacheline reads.
106 Does not count L2 code read prefetches.
107 .It Li REQ_WB
108 Counts the number of writeback (modified to exclusive) transactions.
109 .It Li REQ_PF_DATA_RD
110 Counts the number of data cacheline reads generated by L2 prefetchers.
111 .It Li REQ_PF_RFO
112 Counts the number of RFO requests generated by L2 prefetchers.
113 .It Li REQ_PF_IFETCH
114 Counts the number of code reads generated by L2 prefetchers.
115 .It Li REQ_PF_LLC_DATA_RD
116 L2 prefetcher to L3 for loads.
117 .It Li REQ_PF_LLC_RFO
118 RFO requests generated by L2 prefetcher
119 .It Li REQ_PF_LLC_IFETCH
120 L2 prefetcher to L3 for instruction fetches.
121 .It Li REQ_BUS_LOCKS
122 Bus lock and split lock requests.
123 .It Li REQ_STRM_ST
124 Streaming store requests.
125 .It Li REQ_OTHER
126 Any other request that crosses IDI, including I/O.
127 .It Li RES_ANY
128 Catch all value for any response types.
129 .It Li RES_SUPPLIER_NO_SUPP
130 No Supplier Information available.
131 .It Li RES_SUPPLIER_LLC_HITM
132 M-state initial lookup stat in L3.
133 .It Li RES_SUPPLIER_LLC_HITE
134 E-state.
135 .It Li RES_SUPPLIER_LLC_HITS
136 S-state.
137 .It Li RES_SUPPLIER_LLC_HITF
138 F-state.
139 .It Li RES_SUPPLIER_LOCAL
140 Local DRAM Controller.
141 .It Li RES_SNOOP_SNP_NONE
142 No details on snoop-related information.
143 .It Li RES_SNOOP_SNP_NO_NEEDED
144 No snoop was needed to satisfy the request.
145 .It Li RES_SNOOP_SNP_MISS
146 A snoop was needed and it missed all snooped caches:
147 -For LLC Hit, ReslHitl was returned by all cores
148 -For LLC Miss, Rspl was returned by all sockets and data was returned from
149 DRAM.
150 .It Li RES_SNOOP_HIT_NO_FWD
151 A snoop was needed and it hits in at least one snooped cache.
152 Hit denotes a cache-line was valid before snoop effect.
153 This includes:
154 -Snoop Hit w/ Invalidation (LLC Hit, RFO)
155 -Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD)
156 -Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S)
157 In the LLC Miss case, data is returned from DRAM.
158 .It Li RES_SNOOP_HIT_FWD
159 A snoop was needed and data was forwarded from a remote socket.
160 This includes:
161 -Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT).
162 .It Li RES_SNOOP_HITM
163 A snoop was needed and it HitM-ed in local or remote cache.
164 HitM denotes a cache-line was in modified state before effect as a results of snoop.
165 This includes:
166 -Snoop HitM w/ WB (LLC miss, IFetch/Data_RD)
167 -Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO)
168 -Snoop MtoS (LLC Hit, IFetch/Data_RD).
169 .It Li RES_NON_DRAM
170 Target was non-DRAM system address.
171 This includes MMIO transactions.
172 .El
173 .It Li cmask= Ns Ar value
174 Configure the PMC to increment only if the number of configured
175 events measured in a cycle is greater than or equal to
176 .Ar value .
177 .It Li edge
178 Configure the PMC to count the number of de-asserted to asserted
179 transitions of the conditions expressed by the other qualifiers.
180 If specified, the counter will increment only once whenever a
181 condition becomes true, irrespective of the number of clocks during
182 which the condition remains true.
183 .It Li inv
184 Invert the sense of comparison when the
185 .Dq Li cmask
186 qualifier is present, making the counter increment when the number of
187 events per cycle is less than the value specified by the
188 .Dq Li cmask
189 qualifier.
190 .It Li os
191 Configure the PMC to count events happening at processor privilege
192 level 0.
193 .It Li usr
194 Configure the PMC to count events occurring at privilege levels 1, 2
195 or 3.
196 .El
197 .Pp
198 If neither of the
199 .Dq Li os
200 or
201 .Dq Li usr
202 qualifiers are specified, the default is to enable both.
203 .Ss Event Specifiers (Programmable PMCs)
204 Sandy Bridge programmable PMCs support the following events:
205 .Bl -tag -width indent
206 .It Li LD_BLOCKS.DATA_UNKNOWN
207 .Pq EVENT_03H, Umask 01H
208 Blocked loads due to store buffer blocks with unknown data.
209 .It Li LD_BLOCKS.STORE_FORWARD
210 .Pq Event 03H, Umask 02H
211 Loads blocked by overlapping with store buffer that cannot be forwarded.
212 .It Li LD_BLOCKS.NO_SR
213 .Pq Event 03H, Umask 08H
214 # of Split loads blocked due to resource not available.
215 .It Li LD_BLOCKS.ALL_BLOCK
216 .Pq EVENT_03H, Umask 10H
217 Number of cases where any load is blocked but has no DCU miss.
218 .It Li  MISALIGN_MEM_REF.LOADS
219 .Pq Event 05H, Umask  01H
220 Speculative cache-line split load uops dispatched to L1D.
221 .It Li MISALIGN_MEM_REF.STORES
222 .Pq Event 05H, Umask  02H
223 Speculative cache-line split Store-address uops dispatched to L1D.
224 .It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS
225 .Pq Event 07H, Umask  01H
226 False dependencies in MOB due to partial compare on address.
227 .It Li LD_BLOCKS_PARTIAL.ALL_STA_BLOCK
228 .Pq Event 07H, Umask 08H
229 The number of times that load operations are temporarily blocked because of
230 older stores, with addresses that are not yet known.
231 A load operation may incur more than one block of this type.
232 .It LI DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK
233 .Pq Event 08H, Umask 01H
234 Misses in all TLB levels that cause a page walk of any page size.
235 .It Li DTLB_LOAD_MISSES.WALK_COMPLETED
236 .Pq Event 08H, Umask 02H
237 Misses in all TLB levels that caused page walk completed of any size.
238 .It Li DTLB_LOAD_MISSES.WALK_DURATION
239 .Pq Event 08H, Umask 04H
240 Cycle PMH is busy with a walk.
241 .It Li DTLB_LOAD_MISSES.STLB_HIT
242 .Pq Event 08H, Umask 10H
243 Number of cache load STLB hits.
244 No page walk.
245 .It Li INT_MISC.RECOVERY_CYCLES
246 .Pq Event 0DH, Umask 03H
247 Cycles waiting to recover after Machine Clears or JEClear.
248 Set Cmask = 1.
249 Set Edge to count occurrences
250 .It Li INT_MISC.RAT_STALL_CYCLES
251 .Pq Event 0DH, Umask 40H
252 Cycles RAT external stall is sent to IDQ for this thread.
253 .It Li UOPS_ISSUED.ANY
254 .Pq Event 0EH, Umask 01H
255 Increments each cycle the # of Uops issued by the RAT to RS.
256 Set Cmask = 1, Inv = 1, Any= 1 to count stalled cycles of this core.
257 Set Cmask = 1, Inv = 1 to count stalled cycles
258 .It Li FP_COMP_OPS_EXE.X87
259 .Pq Event 10H, Umask 01H
260 Counts number of X87 uops executed.
261 .It Li FP_COMP_OPS_EXE.SSE_FP_PACKED_DOUBLE
262 .Pq Event 10H, Umask 10H
263 Counts number of SSE* double precision FP packed uops executed.
264 .It Li FP_COMP_OPS_EXE.SSE_FP_SCALAR_SINGLE
265 .Pq Event 10H, Umask 20H
266 Counts number of SSE* single precision FP scalar uops executed.
267 .It Li FP_COMP_OPS_EXE.SSE_PACKED_SINGLE
268 .Pq Event 10H, Umask 40H
269 Counts number of SSE* single precision FP packed uops executed.
270 .It LiFP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE
271 .Pq Event 10H, Umask 80H
272 Counts number of SSE* double precision FP scalar uops executed.
273 .It Li SIMD_FP_256.PACKED_SINGLE
274 .Pq Event 11H, Umask 01H
275 Counts 256-bit packed single-precision floating-point instructions.
276 .It Li SIMD_FP_256.PACKED_DOUBLE
277 .Pq Event 11H, Umask 02H
278 Counts 256-bit packed double-precision floating-point instructions.
279 .It Li ARITH.FPU_DIV_ACTIVE
280 .Pq Event 14H, Umask 01H
281 Cycles that the divider is active, includes INT and FP.
282 Set 'edge =1, cmask=1' to count the number of divides.
283 .It Li INSTS_WRITTEN_TO_IQ.INSTS
284 .Pq Event 17H, Umask 01H
285 Counts the number of instructions written into the IQ every cycle.
286 .It Li L2_RQSTS.DEMAND_DATA_RD_HIT
287 .Pq Event 24H, Umask 01H
288 Demand Data Read requests that hit L2 cache.
289 .It Li L2_RQSTS.ALL_DEMAND_DATA_RD
290 .Pq Event 24H, Umask 03H
291 Counts any demand and L1 HW prefetch data load requests to L2.
292 .It Li L2_RQSTS.RFO_HITS
293 .Pq Event 24H, Umask 04H
294 Counts the number of store RFO requests that hit the L2 cache.
295 .It Li L2_RQSTS.RFO_MISS
296 .Pq Event 24H, Umask 08H
297 Counts the number of store RFO requests that miss the L2 cache.
298 .It Li L2_RQSTS.ALL_RFO
299 .Pq Event 24H, Umask 0CH
300 Counts all L2 store RFO requests.
301 .It Li L2_RQSTS.CODE_RD_HIT
302 .Pq Event 24H, Umask 10H
303 Number of instruction fetches that hit the L2 cache.
304 .It Li L2_RQSTS.CODE_RD_MISS
305 .Pq Event 24H, Umask 20H
306 Number of instruction fetches that missed the L2 cache.
307 .It Li L2_RQSTS.ALL_CODE_RD
308 .Pq Event 24H, Umask 30H
309 Counts all L2 code requests.
310 .It Li L2_RQSTS.PF_HIT
311 .Pq Event 24H, Umask 40H
312 Requests from L2 Hardware prefetcher that hit L2.
313 .It Li L2_RQSTS.PF_MISS
314 .Pq Event 24H, Umask 80H
315 Requests from L2 Hardware prefetcher that missed L2.
316 .It Li L2_RQSTS.ALL_PF
317 .Pq Event 24H, Umask C0H
318 Any requests from L2 Hardware prefetchers.
319 .It Li L2_STORE_LOCK_RQSTS.MISS
320 .Pq Event 27H, Umask 01H
321 RFOs that miss cache lines.
322 .It Li L2_STORE_LOCK_RQSTS.HIT_E
323 .Pq Event 27H, Umask 04H
324 RFOs that hit cache lines in E state.
325 .It Li L2_STORE_LOCK_RQSTS.HIT_M
326 .Pq EVENT_27H, Umask 08H
327 RFOs that hit cache lines in M state.
328 .It Li L2_STORE_LOCK_RQSTS.ALL
329 .Pq EVENT_27H, Umask 0FH
330 RFOs that access cache lines in any state.
331 .It Li L2_L1D_WB_RQSTS.HIT_E
332 .Pq Event 28H, Umask 04H
333 Not rejected writebacks from L1D to L2 cache lines in E state.
334 .It Li L2_L1D_WB_RQSTS.HIT_M
335 .Pq Event 28H, Umask 08H
336 Not rejected writebacks from L1D to L2 cache lines in M state.
337 .It Li LONGEST_LAT_CACHE.REFERENCE
338 .Pq Event 2EH, Umask 4FH
339 This event counts requests originating from the core that reference a cache
340 line in the last level cache.
341 .It Li LONGEST_LAT_CACHE.MISS
342 .Pq Event 2EH, Umask 41H
343 This event counts each cache miss condition for references to the last level
344 cache.
345 .It Li CPU_CLK_UNHALTED.THREAD_P
346 .Pq Event 3CH, Umask 00H
347 Counts the number of thread cycles while the thread is not in a halt state.
348 The thread enters the halt state when it is running the HLT instruction.
349 The core frequency may change from time to time due to power or thermal
350 throttling.
351 .It Li CPU_CLK_THREAD_UNHALTED.REF_XCLK
352 .Pq Event 3CH, Umask 01H
353 Increments at the frequency of XCLK (100 MHz) when not halted.
354 .It Li L1D_PEND_MISS.PENDING
355 .Pq Event 48H, Umask 01H
356 Increments the number of outstanding L1D misses every cycle.
357 Set Cmask = 1 and Edge =1  to count occurrences.
358 Counter 2 only; Set Cmask = 1 to count cycles.
359 .It Li DTLB_STORE_MISSES.MISS_CAUSES_A_WALK
360 .Pq Event 49H, Umask 01H Miss in all TLB levels causes an page walk of any
361 page size (4K/2M/4M/1G).
362 .It Li DTLB_STORE_MISSES.WALK_COMPLETED
363 .Pq Event 49H, Umask 02H
364 Miss in all TLB levels causes a page walk that completes of any page size
365 (4K/2M/4M/1G).
366 .It Li DTLB_STORE_MISSES.WALK_DURATION
367 .Pq Event 49H, Umask 04H
368 Cycles PMH is busy with this walk.
369 .It Li DTLB_STORE_MISSES.STLB_HIT
370 .Pq Event 49H, Umask 10H
371 Store operations that miss the first TLB level but hit the second and do not
372 cause page walks.
373 .It Li LOAD_HIT_PRE.SW_PF
374 .Pq Event 4CH, Umask 01H
375 Not SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.
376 .It Li LOAD_HIT_PER.HW_PF
377 .Pq Event 4CH, Umask 02H
378 Not SW-prefetch load dispatches that hit fill buffer allocated for H/W prefetch.
379 .It Li HW_PRE_REQ.DL1_MISS
380 .Pq Event 4EH, Umask 02H
381 Hardware Prefetch requests that miss the L1D cache.
382 A request is being counted each time it access the cache & miss it, including
383 if a block is applicable or if hit the Fill Buffer for example.
384 This accounts for both L1 streamer and IP-based (IPP) HW prefetchers.
385 .It Li L1D.REPLACEMENT
386 .Pq Event 51H, Umask 01H
387 Counts the number of lines brought into the L1 data cache.
388 .It Li L1D.ALLOCATED_IN_M
389 .Pq Event 51H, Umask 02H
390 Counts the number of allocations of modified L1D cache lines.
391 .It Li L1D.EVICTION
392 .Pq Event 51H, Umask 04H
393 Counts the number of modified lines evicted from the L1 data cache due to
394 replacement.
395 .It Li L1D.ALL_M_REPLACEMENT
396 .Pq Event 51H, Umask 08H
397 Cache lines in M state evicted out of L1D due to Snoop HitM or dirty line
398 replacement.
399 .It Li PARTIAL_RAT_STALLS.FLAGS_MERGE_UOP
400 .Pq Event 59H, Umask 20H
401 Increments the number of flags-merge uops in flight each cycle.
402 Set Cmask = 1 to count cycles.
403 .It Li PARTIAL_RAT_STALLS.SLOW_LEA_WINDOW
404 .Pq Event 59H, Umask 40H
405 Cycles with at least one slow LEA uop allocated.
406 .It Li PARTIAL_RAT_STALLS.MUL_SINGLE_UOP
407 .Pq Event 59H, Umask 80H
408 Number of Multiply packed/scalar single precision uops allocated.
409 .It Li RESOURCE_STALLS2.ALL_FL_EMPTY
410 .Pq Event 5BH, Umask 0CH
411 Cycles stalled due to free list empty.
412 .It Li RESOURCE_STALLS2.ALL_PRF_CONTROL
413 .Pq Event 5BH, Umask 0FH
414 Cycles stalled due to control structures full for physical registers.
415 .It Li RESOURCE_STALLS2.BOB_FULL
416 .Pq Event 5BH, Umask 40H
417 Cycles Allocator is stalled due to Branch Order Buffer.
418 .It Li RESOURCE_STALLS2.OOO_RSRC
419 .Pq Event 5BH, Umask 4FH
420 Cycles stalled due to out of order resources full.
421 .It Li CPL_CYCLES.RING0
422 .Pq Event 5CH, Umask 01H
423 Unhalted core cycles when the thread is in ring 0.
424 Use Edge to count transition
425 .It Li CPL_CYCLES.RING123
426 .Pq Event 5CH, Umask 02H
427 Unhalted core cycles when the thread is not in ring 0.
428 .It Li RS_EVENTS.EMPTY_CYCLES
429 .Pq Event 5EH, Umask 01H
430 Cycles the RS is empty for the thread.
431 .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD
432 .Pq Event 60H, Umask 01H
433 Offcore outstanding Demand Data Read transactions in SQ to uncore.
434 Set Cmask=1 to count cycles.
435 .It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO
436 .Pq Event 60H, Umask 04H
437 Offcore outstanding RFO store transactions in SQ to uncore.
438 Set Cmask=1 to count cycles.
439 .It Li OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD
440 .Pq Event 60H, Umask 08H
441 Offcore outstanding cacheable data read transactions in SQ to uncore.
442 Set Cmask=1 to count cycles.
443 .It Li LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION
444 .Pq Event 63H, Umask 01H
445 Cycles in which the L1D and L2 are locked, due to a UC lock or split lock.
446 .It Li LOCK_CYCLES.CACHE_LOCK_DURATION
447 .Pq Event 63H, Umask 02H
448 Cycles in which the L1D is locked.
449 .It Li IDQ.EMPTY
450 .Pq Event 79H, Umask 02H
451 Counts cycles the IDQ is empty.
452 .It Li IQD.MITE_UOPS
453 .Pq Event 79H, Umask 04H
454 Increment each cycle # of uops delivered to IDQ from MITE path.
455 Set Cmask = 1 to count cycles.
456 Can combine Umask 04H and 20H
457 .It Li IDQ.DSB_UOPS
458 .Pq Event 79H, Umask 08H
459 Increment each cycle.
460 # of uops delivered to IDQ from DSB path.
461 Set Cmask = 1 to count cycles.
462 Can combine Umask 08H and 10H
463 .It Li IDQ.MS_DSB_UOPS
464 .Pq Event 79H, Umask 10H
465 Increment each cycle # of uops delivered to IDQ when MS busy by DSB.
466 Set Cmask = 1 to count cycles MS is busy.
467 Set Cmask=1 and Edge=1 to count MS activations.
468 Can combine Umask 08H and 10H
469 .It Li IDQ.MS_MITE_UOPS
470 .Pq Event 79H, Umask 20H
471 Increment each cycle # of uops delivered to IDQ when MS is busy by MITE.
472 Set Cmask = 1 to count cycles.
473 Can combine Umask 04H and 20H
474 .It Li IDQ.MS_UOPS
475 .Pq Event 79H, Umask 30H
476 Increment each cycle # of uops delivered to IDQ from MS by either DSB or MITE.
477 Set Cmask = 1 to count cycles.
478 Can combine Umask 04H, 08H and 30H
479 .It Li ICACHE.MISSES
480 .Pq Event 80H, Umask 02H
481 Number of Instruction Cache, Streaming Buffer and Victim Cache Misses.
482 Includes UC accesses.
483 .It Li ITLB_MISSES.MISS_CAUSES_A_WALK
484 .Pq Event 85H, Umask 01H
485 Misses in all ITLB levels that cause page walks.
486 .It Li ITLB_MISSES.WALK_COMPLETED
487 .Pq Event 85H, Umask 02H
488 Misses in all ITLB levels that cause completed page walks.
489 .It Li ITLB_MISSES.WALK_DURATION
490 .Pq Event 85H, Umask 04H
491 Cycle PMH is busy with a walk.
492 .It Li ITLB_MISSES.STLB_HIT
493 .Pq Event 85H, Umask 10H
494 Number of cache load STLB hits.
495 No page walk.
496 .It Li ILD_STALL.LCP
497 .Pq Event 87H, Umask 01H
498 Stalls caused by changing prefix length of the instruction.
499 .It Li ILD_STALL.IQ_FULL
500 .Pq Event 87H, Umask 04H
501 Stall cycles due to IQ is full.
502 .It Li BR_INST_EXEC.NONTAKEN_COND
503 .Pq Event 88H , Umask 41H
504 Count conditional near branch instructions that were executed (but not
505 necessarily retired) and not taken.
506 .It Li BR_INST_EXEC.TAKEN_COND
507 .Pq Event 88H , Umask 81H
508 Count conditional near branch instructions that were executed (but not
509 necessarily retired) and taken.
510 .It Li BR_INST_EXEC.DIRECT_JMP
511 .Pq Event 88H , Umask 82H
512 Count all unconditional near branch instructions excluding calls and
513 indirect branches.
514 .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET
515 .Pq Event 88H , Umask 84H
516 Count executed indirect near branch instructions that are not calls nor
517 returns.
518 .It Li BR_INST_EXEC.RETURN_NEAR
519 .Pq Event 88H , Umask 88H
520 Count indirect near branches that have a return mnemonic.
521 .It Li BR_INST_EXEC.DIRECT_NEAR_CALL
522 .Pq Event 88H , Umask 90H
523 Count unconditional near call branch instructions, excluding non call
524 branch, executed.
525 .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL
526 .Pq Event 88H , Umask A0H
527 Count indirect near calls, including both register and memory indirect,
528 executed.
529 .It Li BR_INST_EXEC.ALL_BRANCHES
530 .Pq Event 88H , Umask FFH
531 Counts all near executed branches (not necessarily retired).
532 .It Li BR_MISP_EXEC.NONTAKEN_COND
533 .Pq Event 89H , Umask 41H
534 Count conditional near branch instructions mispredicted as nontaken.
535 .It Li BR_MISP_EXEC.TAKEN_COND
536 .Pq Event 89H , Umask 81H
537 Count conditional near branch instructions mispredicted as taken.
538 .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET
539 .Pq Event 89H , Umask 84H
540 Count mispredicted indirect near branch instructions that are not calls
541 nor returns.
542 .It Li BR_MISP_EXEC.RETURN_NEAR
543 .Pq Event 89H , Umask 88H
544 Count mispredicted indirect near branches that have a return mnemonic.
545 .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL
546 .Pq Event 89H , Umask 90H
547 Count mispredicted unconditional near call branch instructions, excluding
548 non call branch, executed.
549 .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL
550 .Pq Event 89H , Umask A0H
551 Count mispredicted indirect near calls, including both register and memory
552 indirect, executed.
553 .It Li BR_MISP_EXEC.ALL_BRANCHES
554 .Pq Event 89H , Umask FFH
555 Counts all mispredicted near executed branches (not necessarily retired).
556 .It Li IDQ_UOPS_NOT_DELIVERED.CORE
557 .Pq Event 9CH, Umask 01H
558 Count number of non-delivered uops to RAT per thread.
559 Use Cmask to qualify uop b/w
560 .It Li UOPS_DISPATCHED_PORT.PORT_0
561 .Pq Event A1H, Umask 01H
562 Cycles which a Uop is dispatched on port 0.
563 .It Li UOPS_DISPATCHED_PORT.PORT_1
564 .Pq Event A1H, Umask 02H
565 Cycles which a Uop is dispatched on port 1.
566 .It Li UOPS_DISPATCHED_PORT.PORT_2_LD
567 .Pq Event A1H, Umask 04H
568 Cycles which a load uop is dispatched on port 2.
569 .It Li UOPS_DISPATCHED_PORT.PORT_2_STA
570 .Pq Event A1H, Umask 08H
571 Cycles which a store address uop is dispatched on port 2.
572 .It Li UOPS_DISPATCHED_PORT.PORT_2
573 .Pq Event A1H, Umask 0CH
574 Cycles which a Uop is dispatched on port 2.
575 .It Li UOPS_DISPATCHED_PORT.PORT_3_LD
576 .Pq Event A1H, Umask 10H
577 Cycles which a load uop is dispatched on port 3.
578 .It Li UOPS_DISPATCHED_PORT.PORT_3_STA
579 .Pq Event A1H, Umask 20H
580 Cycles which a store address uop is dispatched on port 3.
581 .It Li UOPS_DISPATCHED_PORT.PORT_3
582 .Pq Event A1H, Umask 30H
583 .Pq Cycles which a Uop is dispatched on port 3.
584 .It Li UOPS_DISPATCHED_PORT.PORT_4
585 .Pq Event A1H, Umask 40H
586 Cycles which a Uop is dispatched on port 4.
587 .It Li UOPS_DISPATCHED_PORT.PORT_5
588 .Pq Event A1H, Umask 80H
589 Cycles which a Uop is dispatched on port 5.
590 .It Li RESOURCE_STALLS.ANY
591 .Pq Event A2H, Umask 01H
592 Cycles Allocation is stalled due to Resource Related reason.
593 .It Li RESOURCE_STALLS.LB
594 .Pq Event A2H, Umask 02H
595 Counts the cycles of stall due to lack of load buffers.
596 .It Li RESOURCE_STALLS.LB
597 .Pq Event A2H, Umask 04H
598 Cycles stalled due to no eligible RS entry available.
599 .It Li RESOURCE_STALLS.SB
600 .Pq Event A2H, Umask 08H
601 Cycles stalled due to no store buffers available.
602 (not including draining form sync)
603 .It Li RESOURCE_STALLS.ROB
604 .Pq Event A2H, Umask 10H
605 Cycles stalled due to re-order buffer full.
606 .It Li RESOURCE_STALLS.FCSW
607 .Pq Event A2H, Umask 20H
608 Cycles stalled due to writing the FPU control word.
609 .It Li RESOURCE_STALLS.MXCSR
610 .Pq Event A2H, Umask 40H
611 Cycles stalled due to the MXCSR register rename occurring to close to a previous
612 MXCSR rename.
613 .It Li RESOURCE_STALLS.OTHER
614 .Pq Event A2H, Umask 80H
615 Cycles stalled while execution was stalled due to other resource issues.
616 .It Li DSB2MITE_SWITCHES.COUNT
617 .Pq Event ABH, Umask 01H
618 Number of DSB to MITE switches.
619 .It Li DSB2MITE_SWITCHES.PENALTY_CYCLES
620 .Pq Event ABH, Umask 02H
621 Cycles DSB to MITE switches caused delay.
622 .It Li DSB_FILL.OTHER_CANCEL
623 .Pq Event ACH, Umask 02H
624 Cases of cancelling valid DSB fill not because of exceeding way limit.
625 .It Li DSB_FILL.EXCEED_DSB_LINES
626 .Pq Event ACH, Umask 08H
627 DSB Fill encountered > 3 DSB lines.
628 .It Li DSB_FILL.ALL_CANCEL
629 .Pq Event ACH, Umask 0AH
630 Cases of cancelling valid Decode Stream Buffer (DSB) fill not because of exceeding
631 way limit.
632 .It Li ITLB.ITLB_FLUSH
633 .Pq Event AEH, Umask 01H
634 Counts the number of ITLB flushes, includes 4k/2M/4M pages.
635 .It Li OFFCORE_REQUESTS.DEMAND_DATA_RD
636 .Pq Event B0H, Umask 01H
637 Demand data read requests sent to uncore.
638 .It Li OFFCORE_REQUESTS.DEMAND_RFO
639 .Pq Event B0H, Umask 04H
640 Demand RFO read requests sent to uncore, including regular RFOs, locks, ItoM.
641 .It Li OFFCORE_REQUESTS.ALL_DATA_RD
642 .Pq Event B0H, Umask 08H
643 Data read requests sent to uncore (demand and prefetch).
644 .It Li UOPS_DISPATCHED.THREAD
645 .Pq Event B1H, Umask 01H
646 Counts total number of uops to be dispatched per-thread each cycle.
647 Set Cmask = 1, INV =1 to count stall cycles.
648 .It Li UOPS_DISPATCHED.CORE
649 .Pq Event B1H, Umask 02H
650 Counts total number of uops to be dispatched per-core each cycle.
651 Do not need to set ANY
652 .It Li OFFCORE_REQUESTS_BUFFER.SQ_FULL
653 .Pq Event B2H, Umask 01H
654 Offcore requests buffer cannot take more entries for this thread core.
655 .It Li AGU_BYPASS_CANCEL.COUNT
656 .Pq Event B6H, Umask 01H
657 Counts executed load operations with all the following traits: 1. addressing
658 of the format [base + offset], 2. the offset is between 1 and 2047, 3. the
659 address specified in the base register is in one page and the address
660 [base+offset] is in another page.
661 .It Li OFF_CORE_RESPONSE_0
662 .Pq Event B7H, Umask 01H
663 Off-core Response Performance Monitoring; PMC0 only.
664 Requires programming MSR 01A6H
665 .It Li OFF_CORE_RESPONSE_1
666 .Pq Event BBH, Umask 01H
667 Off-core Response Performance Monitoring.
668 PMC3 only.
669 Requires programming MSR 01A7H
670 .It Li TLB_FLUSH.DTLB_THREAD
671 .Pq Event BDH, Umask 01H
672 DTLB flush attempts of the thread-specific entries.
673 .It Li TLB_FLUSH.STLB_ANY
674 .Pq Event BDH, Umask 20H
675 Count number of STLB flush attempts.
676 .It Li L1D_BLOCKS.BANK_CONFLICT_CYCLES
677 .Pq Event BFH, Umask 05H
678 Cycles when dispatched loads are cancelled due to L1D bank conflicts with other
679 load ports.
680 cmask=1
681 .It Li INST_RETIRED.ANY_P
682 .Pq Event C0H, Umask 00H
683 Number of instructions at retirement.
684 .It Li INST_RETIRED.PREC_DIST
685 .Pq Event C0H, Umask 01H
686 Precise instruction retired event with HW to reduce effect of PEBS shadow in IP
687 distribution PMC1 only; Must quiesce other PMCs.
688 .It Li INST_RETIRED.X87
689 .Pq Event C0H, Umask 02H
690 X87 instruction retired event.
691 .It Li OTHER_ASSISTS.ITLB_MISS_RETIRED
692 .Pq Event C1H, Umask 02H
693 Instructions that experienced an ITLB miss.
694 .It Li OTHER_ASSISTS.AVX_STORE
695 .Pq Event C1H, Umask 08H
696 Number of assists associated with 256-bit AVX store operations.
697 .It Li OTHER_ASSISTS.AVX_TO_SSE
698 .Pq Event C1H, Umask 10H
699 Number of transitions from AVX256 to legacy SSE when penalty applicable.
700 .It Li OTHER_ASSISTS.SSE_TO_AVX
701 .Pq Event C1H, Umask 20H
702 Number of transitions from SSE to AVX-256 when penalty applicable.
703 .It Li UOPS_RETIRED.ALL
704 .Pq Event C2H, Umask 01H
705 Counts the number of micro-ops retired.
706 Use cmask=1 and invert to count active cycles or stalled cycles.
707 .It Li UOPS_RETIRED.RETIRE_SLOTS
708 .Pq Event C2H, Umask 02H
709 Counts the number of retirement slots used each cycle.
710 .It Li MACHINE_CLEARS.MEMORY_ORDERING
711 .Pq Event C3H, Umask 02H
712 Counts the number of machine clears due to memory order conflicts.
713 .It Li MACHINE_CLEARS.SMC
714 .Pq Event C3H, Umask 04H
715 Counts the number of times that a program writes to a code section.
716 .It Li MACHINE_CLEARS.MASKMOV
717 .Pq Event C3H, Umask 20H
718 Counts the number of executed AVX masked load operations that refer to an
719 illegal address range with the mask bits set to 0.
720 .It Li BR_INST_RETIRED.ALL_BRANCH
721 .Pq Event C4H, Umask 00H
722 Branch instructions at retirement.
723 .It Li BR_INST_RETIRED.CONDITIONAL
724 .Pq Event C4H, Umask 01H
725 Counts the number of conditional branch instructions retired.
726 .It Li BR_INST_RETIRED.NEAR_CALL
727 .Pq Event C4H, Umask 02H
728 Direct and indirect near call instructions retired.
729 .It Li BR_INST_RETIRED.ALL_BRANCHES
730 .Pq Event C4H, Umask 04H
731 Counts the number of branch instructions retired.
732 .It Li BR_INST_RETIRED.NEAR_RETURN
733 .Pq Event C4H, Umask 08H
734 Counts the number of near return instructions retired.
735 .It Li BR_INST_RETIRED.NOT_TAKEN
736 .Pq Event C4H, Umask 10H
737 Counts the number of not taken branch instructions retired.
738 .It Li BR_INST_RETIRED.NEAR_TAKEN
739 .Pq Event C4H, Umask 20H
740 Number of near taken branches retired.
741 .It Li BR_INST_RETIRED.FAR_BRANCH
742 .Pq Event C4H, Umask 40H
743 Number of far branches retired.
744 .It Li BR_MISP_RETIRED.ALL_BRANCHES
745 .Pq Event C5H, Umask 00H
746 Mispredicted branch instructions at retirement.
747 .It Li BR_MISP_RETIRED.CONDITIONAL
748 .Pq Event C5H, Umask 01H
749 Mispredicted conditional branch instructions retired.
750 .It Li BR_MISP_RETIRED.NEAR_CALL
751 .Pq Event C5H, Umask 02H
752 Direct and indirect mispredicted near call instructions retired.
753 .It Li BR_MISP_RETIRED.ALL_BRANCH
754 .Pq Event C5H, Umask 04H
755 Mispredicted macro branch instructions retired.
756 .It Li BR_MISP_RETIRED.NOT_TAKEN
757 .Pq Event C5H, Umask 10H
758 Mispredicted not taken branch instructions retired.
759 .It Li BR_MISP_RETIRED.TAKEN
760 .Pq Event C5H, Umask 20H
761 Mispredicted taken branch instructions retired.
762 .It Li FP_ASSIST.X87_OUTPUT
763 .Pq Event CAH, Umask 02H
764 Number of X87 assists due to output value.
765 .It Li FP_ASSIST.X87_INPUT
766 .Pq Event CAH, Umask 04H
767 Number of X87 assists due to input value.
768 .It Li FP_ASSIST.SIMD_OUTPUT
769 .Pq Event CAH, Umask 08H
770 Number of SIMD FP assists due to Output values.
771 .It Li FP_ASSIST.SIMD_INPUT
772 .Pq Event CAH, Umask 10H
773 Number of SIMD FP assists due to input values.
774 .It Li FP_ASSIST.ANY
775 .Pq Event CAH, Umask 1EH
776 Cycles with any input/output SSE* or FP assists.
777 .It Li ROB_MISC_EVENTS.LBR_INSERTS
778 .Pq Event CCH, Umask 20H
779 Count cases of saving new LBR records by hardware.
780 .It Li MEM_TRANS_RETIRED.LOAD_LATENCY
781 .Pq Event CDH, Umask 01H
782 Sample loads with specified latency threshold.
783 PMC3 only.
784 Specify threshold in MSR 0x3F6.
785 .It Li MEM_TRANS_RETIRED.PRECISE_STORE
786 .Pq Event CDH, Umask 02H
787 Sample stores and collect precise store operation via PEBS record.
788 PMC3 only.
789 .It Li MEM_UOP_RETIRED.LOADS
790 .Pq Event D0H, Umask 01H
791 Qualify retired memory uops that are loads.
792 Combine with umask 10H, 20H, 40H, 80H.
793 .It Li MEM_UOP_RETIRED.STORES
794 .Pq Event D0H, Umask 02H
795 Qualify retired memory uops that are stores.
796 Combine with umask 10H, 20H, 40H, 80H.
797 .It Li MEM_UOP_RETIRED.STLB_MISS
798 .Pq Event D0H, Umask 10H
799 Qualify retired memory uops with STLB miss.
800 Must combine with umask 01H, 02H, to produce counts.
801 .It Li MEM_UOP_RETIRED.LOCK
802 .Pq Event D0H, Umask 20H
803 Qualify retired memory uops with lock.
804 Must combine with umask 01H, 02H, to produce counts.
805 .It Li MEM_UOP_RETIRED.SPLIT
806 .Pq Event D0H, Umask 40H
807 Qualify retired memory uops with line split.
808 Must combine with umask 01H, 02H, to produce counts.
809 .It Li MEM_UOP_RETIRED_ALL
810 .Pq Event D0H, Umask 80H
811 Qualify any retired memory uops.
812 Must combine with umask 01H, 02H, to produce counts.
813 .It Li MEM_LOAD_UOPS_RETIRED.L1_HIT
814 .Pq Event D1H, Umask 01H
815 Retired load uops with L1 cache hits as data sources.
816 Must combine with umask 01H, 02H, to produce counts.
817 .It Li MEM_LOAD_UOPS_RETIRED.L2_HIT
818 .Pq Event D1H, Umask 02H
819 Retired load uops with L2 cache hits as data sources.
820 .It Li MEM_LOAD_UOPS_RETIRED.LLC_HIT
821 .Pq Event D1H, Umask 04H
822 Retired load uops which data sources were data hits in LLC without snoops
823 required.
824 .It Li MEM_LOAD_UOPS_RETIRED.HIT_LFB
825 .Pq Event D1H, Umask 40H
826 Retired load uops which data sources were load uops missed L1 but hit FB due
827 to preceding miss to the same cache line with data not ready.
828 .It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS
829 .Pq Event D2H, Umask 01H
830 Retired load uops which data sources were LLC hit and cross-core snoop missed in
831 on-pkg core cache.
832 .It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT
833 .Pq Event D2H, Umask 02H
834 Retired load uops which data sources were LLC and cross-core snoop hits in
835 on-pkg core cache.
836 .It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM
837 .Pq Event D2H, Umask 04H
838 Retired load uops which data sources were HitM responses from shared LLC.
839 .It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE
840 .Pq Event D2H, Umask 08H
841 Retired load uops which data sources were hits in LLC without snoops required.
842 .It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.LLC_MISS
843 .Pq Event D4H, Umask 02H
844 Retired load uops with unknown information as data source in cache serviced the load.
845 .It Li L2_TRANS.DEMAND_DATA_RD
846 .Pq Event F0H, Umask 01H
847 Demand Data Read requests that access L2 cache.
848 .It Li L2_TRANS.RF0
849 .Pq Event F0H, Umask 02H
850 RFO requests that access L2 cache.
851 .It Li L2_TRANS.CODE_RD
852 .Pq Event F0H, Umask 04H
853 L2 cache accesses when fetching instructions.
854 .It Li L2_TRANS.ALL_PF
855 .Pq Event F0H, Umask 08H
856 L2 or LLC HW prefetches that access L2 cache.
857 .It Li L2_TRANS.L1D_WB
858 .Pq Event F0H, Umask 10H
859 L1D writebacks that access L2 cache.
860 .It Li L2_TRANS.L2_FILL
861 .Pq Event F0H, Umask 20H
862 L2 fill requests that access L2 cache.
863 .It Li L2_TRANS.L2_WB
864 .Pq Event F0H, Umask 40H
865 L2 writebacks that access L2 cache.
866 .It Li L2_TRANS.ALL_REQUESTS
867 .Pq Event F0H, Umask 80H
868 Transactions accessing L2 pipe.
869 .It Li L2_LINES_IN.I
870 .Pq Event F1H, Umask 01H
871 L2 cache lines in I state filling L2.
872 Counting does not cover rejects.
873 .It Li L2_LINES_IN.S
874 .Pq Event F1H, Umask 02H
875 L2 cache lines in S state filling L2.
876 Counting does not cover rejects.
877 .It Li L2_LINES_IN.E
878 .Pq Event F1H, Umask 04H
879 L2 cache lines in E state filling L2.
880 Counting does not cover rejects.
881 .It Li L2_LINES-IN.ALL
882 .Pq Event F1H, Umask 07H
883 L2 cache lines filling L2.
884 Counting does not cover rejects.
885 .It Li L2_LINES_OUT.DEMAND_CLEAN
886 .Pq Event F2H, Umask 01H
887 Clean L2 cache lines evicted by demand.
888 .It Li L2_LINES_OUT.DEMAND_DIRTY
889 .Pq Event F2H, Umask 02H
890 Dirty L2 cache lines evicted by demand.
891 .It Li L2_LINES_OUT.PF_CLEAN
892 .Pq Event F2H, Umask 04H
893 Clean L2 cache lines evicted by L2 prefetch.
894 .It Li L2_LINES_OUT.PF_DIRTY
895 .Pq Event F2H, Umask 08H
896 Dirty L2 cache lines evicted by L2 prefetch.
897 .It Li L2_LINES_OUT.DIRTY_ALL
898 .Pq Event F2H, Umask 0AH
899 Dirty L2 cache lines filling the L2.
900 Counting does not cover rejects.
901 .It Li SQ_MISC.SPLIT_LOCK
902 .Pq Event F4H, Umask 10H
903 Split locks in SQ.
904 .El
905 .Sh SEE ALSO
906 .Xr pmc 3 ,
907 .Xr pmc.atom 3 ,
908 .Xr pmc.core 3 ,
909 .Xr pmc.corei7 3 ,
910 .Xr pmc.corei7uc 3 ,
911 .Xr pmc.iaf 3 ,
912 .Xr pmc.ivybridge 3 ,
913 .Xr pmc.ivybridgexeon 3 ,
914 .Xr pmc.k7 3 ,
915 .Xr pmc.k8 3 ,
916 .Xr pmc.p4 3 ,
917 .Xr pmc.p5 3 ,
918 .Xr pmc.p6 3 ,
919 .Xr pmc.sandybridgeuc 3 ,
920 .Xr pmc.sandybridgexeon 3 ,
921 .Xr pmc.soft 3 ,
922 .Xr pmc.tsc 3 ,
923 .Xr pmc.ucf 3 ,
924 .Xr pmc.westmere 3 ,
925 .Xr pmc.westmereuc 3 ,
926 .Xr pmc_cpuinfo 3 ,
927 .Xr pmclog 3 ,
928 .Xr hwpmc 4
929 .Sh HISTORY
930 The
931 .Nm pmc
932 library first appeared in
933 .Fx 6.0 .
934 .Sh AUTHORS
935 .An -nosplit
936 The
937 .Lb libpmc
938 library was written by
939 .An Joseph Koshy Aq Mt jkoshy@FreeBSD.org .
940 The support for the Sandy Bridge
941 microarchitecture was written by
942 .An Davide Italiano Aq Mt davide@FreeBSD.org .