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