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