PMC.SANDYBRIDGE(3)
π NAME π
pmc.sandybridge β measurement events for Intel Sandy Bridge family CPUs. Yes bestie, from the Library Functions Manual, and itβs giving βletβs actually measure what this silicon is doing.β β¨
πΈ LIBRARY πΈ
Performance Counters Library (libpmc, -lpmc) β thatβs the whole point, link it and go.
β¨ SYNOPSIS β¨
#include <pmc.h>
π DESCRIPTION π
Okay so: Intel Sandy Bridge CPUs contain PMCs conforming to the version 3 of the Intel performance measurement architecture. These CPUs may contain up to three classes of PMCs:
PMC_CLASS_IAFβ Fixed-function counters that count only one hardware event per counter.PMC_CLASS_IAPβ Programmable counters that may be configured to count one of a defined set of hardware events.PMC_CLASS_TSCβ These PMCs are documented inpmc.tsc(3).
The number of PMCs available in each class and their widths need to be determined at run time by calling pmc_cpuinfo(3). No guessing, bestie. π«Ά
Intel Sandy Bridge PMCs are documented in βVolume 3B: System Programming Guide, Part 2β, Intel(R) 64 and IA-32 Architectures Software Developers Manual, Order Number: 253669-039US, Intel Corporation, May 2011.
π¦ SANDY BRIDGE FIXED FUNCTION PMCS π¦
These PMCs and their supported events are documented in pmc.iaf(3).
π«Ά SANDY BRIDGE PROGRAMMABLE PMCS π«Ά
The programmable PMCs support the following capabilities:
PMC_CAP_CASCADEβ NoPMC_CAP_EDGEβ YesPMC_CAP_INTERRUPTβ YesPMC_CAP_INVERTβ YesPMC_CAP_READβ YesPMC_CAP_PRECISEβ NoPMC_CAP_SYSTEMβ YesPMC_CAP_TAGGINGβ NoPMC_CAP_THRESHOLDβ YesPMC_CAP_USERβ YesPMC_CAP_WRITEβ Yes
π« Event Qualifiers π«
Event specifiers for these PMCs support the following common qualifiers:
rsp=valueβ Configure the Off-core Response bits.REQ_DMND_DATA_RDβ Counts the number of demand and DCU prefetch data reads of full and partial cachelines as well as demand data page table entry cacheline reads. Does not count L2 data read prefetches or instruction fetches.REQ_DMND_RFOβ Counts the number of demand and DCU prefetch reads for ownership (RFO) requests generated by a write to data cacheline. Does not count L2 RFO prefetches.REQ_DMND_IFETCHβ Counts the number of demand and DCU prefetch instruction cacheline reads. Does not count L2 code read prefetches.REQ_WBβ Counts the number of writeback (modified to exclusive) transactions.REQ_PF_DATA_RDβ Counts the number of data cacheline reads generated by L2 prefetchers.REQ_PF_RFOβ Counts the number of RFO requests generated by L2 prefetchers.REQ_PF_IFETCHβ Counts the number of code reads generated by L2 prefetchers.REQ_PF_LLC_DATA_RDβ L2 prefetcher to L3 for loads.REQ_PF_LLC_RFOβ RFO requests generated by L2 prefetcherREQ_PF_LLC_IFETCHβ L2 prefetcher to L3 for instruction fetches.REQ_BUS_LOCKSβ Bus lock and split lock requests.REQ_STRM_STβ Streaming store requests.REQ_OTHERβ Any other request that crosses IDI, including I/O.RES_ANYβ Catch all value for any response types.RES_SUPPLIER_NO_SUPPβ No Supplier Information available.RES_SUPPLIER_LLC_HITMβ M-state initial lookup stat in L3.RES_SUPPLIER_LLC_HITEβ E-state.RES_SUPPLIER_LLC_HITSβ S-state.RES_SUPPLIER_LLC_HITFβ F-state.RES_SUPPLIER_LOCALβ Local DRAM Controller.RES_SNOOP_SNP_NONEβ No details on snoop-related information.RES_SNOOP_SNP_NO_NEEDEDβ No snoop was needed to satisfy the request.RES_SNOOP_SNP_MISSβ A snoop was needed and it missed all snooped caches: -For LLC Hit, ReslHitl was returned by all cores -For LLC Miss, Rspl was returned by all sockets and data was returned from DRAM.RES_SNOOP_HIT_NO_FWDβ A snoop was needed and it hits in at least one snooped cache. Hit denotes a cache-line was valid before snoop effect. This includes: -Snoop Hit w/ Invalidation (LLC Hit, RFO) -Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD) -Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S) In the LLC Miss case, data is returned from DRAM.RES_SNOOP_HIT_FWDβ A snoop was needed and data was forwarded from a remote socket. This includes: -Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT).RES_SNOOP_HITMβ A snoop was needed and it HitM-ed in local or remote cache. HitM denotes a cache-line was in modified state before effect as a results of snoop. This includes: -Snoop HitM w/ WB (LLC miss, IFetch/Data_RD) -Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO) -Snoop MtoS (LLC Hit, IFetch/Data_RD).RES_NON_DRAMβ Target was non-DRAM system address. This includes MMIO transactions.
cmask=valueβ Configure the PMC to increment only if the number of configured events measured in a cycle is greater than or equal to value.edgeβ Configure the PMC to count the number of de-asserted to asserted transitions of the conditions expressed by the other qualifiers. If specified, the counter will increment only once whenever a condition becomes true, irrespective of the number of clocks during which the condition remains true.invβ Invert the sense of comparison when the βcmaskβ qualifier is present, making the counter increment when the number of events per cycle is less than the value specified by the βcmaskβ qualifier.osβ Configure the PMC to count events happening at processor privilege level 0.usrβ Configure the PMC to count events occurring at privilege levels 1, 2 or 3.
If neither of the βosβ or βusrβ qualifiers are specified, the default is to enable both.
π Event Specifiers (Programmable PMCs) π
Sandy Bridge programmable PMCs support the following events:
LD_BLOCKS.DATA_UNKNOWNβEvent 03H, Umask 01H: Blocked loads due to store buffer blocks with unknown data.LD_BLOCKS.STORE_FORWARDβEvent 03H, Umask 02H: Loads blocked by overlapping with store buffer that cannot be forwarded.LD_BLOCKS.NO_SRβEvent 03H, Umask 08H: # of Split loads blocked due to resource not available.LD_BLOCKS.ALL_BLOCKβEvent 03H, Umask 10H: Number of cases where any load is blocked but has no DCU miss.MISALIGN_MEM_REF.LOADSβEvent 05H, Umask 01H: Speculative cache-line split load uops dispatched to L1D.MISALIGN_MEM_REF.STORESβEvent 05H, Umask 02H: Speculative cache-line split Store-address uops dispatched to L1D.LD_BLOCKS_PARTIAL.ADDRESS_ALIASβEvent 07H, Umask 01H: False dependencies in MOB due to partial compare on address.LD_BLOCKS_PARTIAL.ALL_STA_BLOCKβEvent 07H, Umask 08H: The number of times that load operations are temporarily blocked because of older stores, with addresses that are not yet known. A load operation may incur more than one block of this type.LI DTLB_LOAD_MISSES.MISS_CAUSES_A_WALKβEvent 08H, Umask 01H: Misses in all TLB levels that cause a page walk of any page size.DTLB_LOAD_MISSES.WALK_COMPLETEDβEvent 08H, Umask 02H: Misses in all TLB levels that caused page walk completed of any size.DTLB_LOAD_MISSES.WALK_DURATIONβEvent 08H, Umask 04H: Cycle PMH is busy with a walk.DTLB_LOAD_MISSES.STLB_HITβEvent 08H, Umask 10H: Number of cache load STLB hits. No page walk.INT_MISC.RECOVERY_CYCLESβEvent 0DH, Umask 03H: Cycles waiting to recover after Machine Clears or JEClear. Set Cmask = 1. Set Edge to count occurrencesINT_MISC.RAT_STALL_CYCLESβEvent 0DH, Umask 40H: Cycles RAT external stall is sent to IDQ for this thread.UOPS_ISSUED.ANYβEvent 0EH, Umask 01H: Increments each cycle the # of Uops issued by the RAT to RS. Set Cmask = 1, Inv = 1, Any= 1 to count stalled cycles of this core. Set Cmask = 1, Inv = 1 to count stalled cyclesFP_COMP_OPS_EXE.X87βEvent 10H, Umask 01H: Counts number of X87 uops executed.FP_COMP_OPS_EXE.SSE_FP_PACKED_DOUBLEβEvent 10H, Umask 10H: Counts number of SSE* double precision FP packed uops executed.FP_COMP_OPS_EXE.SSE_FP_SCALAR_SINGLEβEvent 10H, Umask 20H: Counts number of SSE* single precision FP scalar uops executed.FP_COMP_OPS_EXE.SSE_PACKED_SINGLEβEvent 10H, Umask 40H: Counts number of SSE* single precision FP packed uops executed.LiFP_COMP_OPS_EXE.SSE_SCALAR_DOUBLEβEvent 10H, Umask 80H: Counts number of SSE* double precision FP scalar uops executed.SIMD_FP_256.PACKED_SINGLEβEvent 11H, Umask 01H: Counts 256-bit packed single-precision floating-point instructions.SIMD_FP_256.PACKED_DOUBLEβEvent 11H, Umask 02H: Counts 256-bit packed double-precision floating-point instructions.ARITH.FPU_DIV_ACTIVEβEvent 14H, Umask 01H: Cycles that the divider is active, includes INT and FP. Set 'edge =1, cmask=1' to count the number of divides.INSTS_WRITTEN_TO_IQ.INSTSβEvent 17H, Umask 01H: Counts the number of instructions written into the IQ every cycle.L2_RQSTS.DEMAND_DATA_RD_HITβEvent 24H, Umask 01H: Demand Data Read requests that hit L2 cache.L2_RQSTS.ALL_DEMAND_DATA_RDβEvent 24H, Umask 03H: Counts any demand and L1 HW prefetch data load requests to L2.L2_RQSTS.RFO_HITSβEvent 24H, Umask 04H: Counts the number of store RFO requests that hit the L2 cache.
okay back to the event buffet, bestie β we were literally mid-list π
L2_RQSTS.RFO_MISSβ (Event24H, Umask08H) counts the store RFO requests that miss the L2 cache.L2_RQSTS.ALL_RFOβ (Event24H, Umask0CH) counts all the L2 store RFO requests. every single one, no filter.L2_RQSTS.CODE_RD_HITβ (Event24H, Umask10H) the number of instruction fetches that hit the L2 cache. slay.L2_RQSTS.CODE_RD_MISSβ (Event24H, Umask20H) the number of instruction fetches that missed the L2 cache π.L2_RQSTS.ALL_CODE_RDβ (Event24H, Umask30H) counts all L2 code requests.L2_RQSTS.PF_HITβ (Event24H, Umask40H) requests from the L2 Hardware prefetcher that hit L2.L2_RQSTS.PF_MISSβ (Event24H, Umask80H) requests from the L2 Hardware prefetcher that missed L2.L2_RQSTS.ALL_PFβ (Event24H, UmaskC0H) literally any requests from L2 Hardware prefetchers. the whole prefetch friend group π«ΆL2_STORE_LOCK_RQSTS.MISSβ (Event27H, Umask01H) RFOs that miss cache lines.L2_STORE_LOCK_RQSTS.HIT_Eβ (Event27H, Umask04H) RFOs that hit cache lines in E state.L2_STORE_LOCK_RQSTS.HIT_Mβ (Event27H, Umask08H) RFOs that hit cache lines in M state.L2_STORE_LOCK_RQSTS.ALLβ (Event27H, Umask0FH) RFOs that access cache lines in any state. iconic inclusivity.L2_L1D_WB_RQSTS.HIT_Eβ (Event28H, Umask04H) not rejected writebacks from L1D to L2 cache lines in E state.L2_L1D_WB_RQSTS.HIT_Mβ (Event28H, Umask08H) not rejected writebacks from L1D to L2 cache lines in M state.LONGEST_LAT_CACHE.REFERENCEβ (Event2EH, Umask4FH) counts requests coming from the core that reference a cache line in the last level cache. the final boss of caches πLONGEST_LAT_CACHE.MISSβ (Event2EH, Umask41H) counts each cache miss condition for references to the last level cache. every single one πCPU_CLK_UNHALTED.THREAD_Pβ (Event3CH, Umask00H) counts the number of thread cycles while the thread is not in a halt state. the thread enters the halt state when it's running theHLTinstruction. heads up: the core frequency may change from time to time due to power or thermal throttling β so yeah, your numbers can vibe-shift on you π‘οΈCPU_CLK_THREAD_UNHALTED.REF_XCLKβ (Event3CH, Umask01H) increments at the frequency ofXCLK(100MHz) when not halted.L1D_PEND_MISS.PENDINGβ (Event48H, Umask01H) increments the number of outstanding L1D misses every cycle. setCmask = 1andEdge =1to count occurrences. Counter 2 only; setCmask = 1to count cycles. read that twice bestie, it matters πDTLB_STORE_MISSES.MISS_CAUSES_A_WALKβ (Event49H, Umask01H) a miss in all TLB levels that causes a page walk of any page size (4K/2M/4M/1G).DTLB_STORE_MISSES.WALK_COMPLETEDβ (Event49H, Umask02H) a miss in all TLB levels that causes a page walk which completes, of any page size (4K/2M/4M/1G).DTLB_STORE_MISSES.WALK_DURATIONβ (Event49H, Umask04H) cycles PMH is busy with this walk.DTLB_STORE_MISSES.STLB_HITβ (Event49H, Umask10H) store operations that miss the first TLB level but hit the second and do not cause page walks. a little win πLOAD_HIT_PRE.SW_PFβ (Event4CH, Umask01H) not SW-prefetch load dispatches that hit fill buffer allocated for S/W prefetch.LOAD_HIT_PER.HW_PFβ (Event4CH, Umask02H) not SW-prefetch load dispatches that hit fill buffer allocated for H/W prefetch.HW_PRE_REQ.DL1_MISSβ (Event4EH, Umask02H) Hardware Prefetch requests that miss the L1D cache. a request is being counted each time it accesses the cache & misses it β including if a block is applicable, or if it hit the Fill Buffer, for example. this accounts for both the L1 streamer and IP-based (IPP) HW prefetchers π§L1D.REPLACEMENTβ (Event51H, Umask01H) counts the number of lines brought into the L1 data cache.L1D.ALLOCATED_IN_Mβ (Event51H, Umask02H) counts the number of allocations of modified L1D cache lines.L1D.EVICTIONβ (Event51H, Umask04H) counts the number of modified lines evicted from the L1 data cache due to replacement. bye bestie πL1D.ALL_M_REPLACEMENTβ (Event51H, Umask08H) cache lines in M state evicted out of L1D due to Snoop HitM or dirty line replacement.PARTIAL_RAT_STALLS.FLAGS_MERGE_UOPβ (Event59H, Umask20H) increments the number of flags-merge uops in flight each cycle. setCmask = 1to count cycles.PARTIAL_RAT_STALLS.SLOW_LEA_WINDOWβ (Event59H, Umask40H) cycles with at least one slow LEA uop allocated.PARTIAL_RAT_STALLS.MUL_SINGLE_UOPβ (Event59H, Umask80H) number of Multiply packed/scalar single precision uops allocated.RESOURCE_STALLS2.ALL_FL_EMPTYβ (Event5BH, Umask0CH) cycles stalled due to free list empty.RESOURCE_STALLS2.ALL_PRF_CONTROLβ (Event5BH, Umask0FH) cycles stalled due to control structures full for physical registers.RESOURCE_STALLS2.BOB_FULLβ (Event5BH, Umask40H) cycles the Allocator is stalled due to the Branch Order Buffer.RESOURCE_STALLS2.OOO_RSRCβ (Event5BH, Umask4FH) cycles stalled due to out of order resources full.CPL_CYCLES.RING0β (Event5CH, Umask01H) unhalted core cycles when the thread is in ring0. useEdgeto count transition πCPL_CYCLES.RING123β (Event5CH, Umask02H) unhalted core cycles when the thread is not in ring0.RS_EVENTS.EMPTY_CYCLESβ (Event5EH, Umask01H) cycles the RS is empty for the thread.OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RDβ (Event60H, Umask01H) offcore outstanding Demand Data Read transactions in SQ to uncore. setCmask=1to count cycles.OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFOβ (Event60H, Umask04H) offcore outstanding RFO store transactions in SQ to uncore. setCmask=1to count cycles.OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RDβ (Event60H, Umask08H) offcore outstanding cacheable data read transactions in SQ to uncore. setCmask=1to count cycles.LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATIONβ (Event63H, Umask01H) cycles in which the L1D and L2 are locked, due to a UC lock or split lock.LOCK_CYCLES.CACHE_LOCK_DURATIONβ (Event63H, Umask02H) cycles in which the L1D is locked.IDQ.EMPTYβ (Event79H, Umask02H) counts cycles the IDQ is empty.IQD.MITE_UOPSβ (Event79H, Umask04H) increment each cycle # of uops delivered to IDQ from the MITE path. setCmask = 1to count cycles. can combine Umask04Hand20H. (yes, the name really is spelledIQDhere β that's the page's spelling, not me being chaotic π)IDQ.DSB_UOPSβ (Event79H, Umask08H) increment each cycle. # of uops delivered to IDQ from the DSB path. setCmask = 1to count cycles. can combine Umask08Hand10H.IDQ.MS_DSB_UOPSβ (Event79H, Umask10H) increment each cycle # of uops delivered to IDQ when MS is busy by DSB. setCmask = 1to count cycles MS is busy. setCmask=1andEdge=1to count MS activations. can combine Umask08Hand10H.IDQ.MS_MITE_UOPSβ (Event79H, Umask20H) increment each cycle # of uops delivered to IDQ when MS is busy by MITE. setCmask = 1to count cycles. can combine Umask04Hand20H.IDQ.MS_UOPSβ (Event79H, Umask30H) increment each cycle # of uops delivered to IDQ from MS by either DSB or MITE. setCmask = 1to count cycles. can combine Umask04H,08Hand30H.ICACHE.MISSESβ (Event80H, Umask02H) number of Instruction Cache, Streaming Buffer and Victim Cache Misses. includes UC accesses.ITLB_MISSES.MISS_CAUSES_A_WALKβ (Event85H, Umask01H) misses in all ITLB levels that cause page walks.ITLB_MISSES.WALK_COMPLETEDβ (Event85H, Umask02H) misses in all ITLB levels that cause completed page walks.ITLB_MISSES.WALK_DURATIONβ (Event85H, Umask04H) cycle PMH is busy with a walk.ITLB_MISSES.STLB_HITβ (Event85H, Umask10H) number of cache load STLB hits. no page walk. periodt β¨ILD_STALL.LCPβ (Event87H, Umask01H) stalls caused by changing prefix length of the instruction.ILD_STALL.IQ_FULLβ (Event87H, Umask04H) stall cycles due to IQ being full.BR_INST_EXEC.NONTAKEN_CONDβ (Event88H, Umask41H) counts conditional near branch instructions that were executed (but not necessarily retired) and not taken.BR_INST_EXEC.TAKEN_CONDβ (Event88H, Umask81H) counts conditional near branch instructions that were executed (but not necessarily retired) and taken.BR_INST_EXEC.DIRECT_JMPβ (Event88H, Umask82H) counts all unconditional near branch instructions, excluding calls and indirect branches.BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RETβ (Event88H, Umask84H) counts executed indirect near branch instructions that are not calls nor returns.BR_INST_EXEC.RETURN_NEARβ (Event88H, Umask88H) counts indirect near branches that have a return mnemonic.BR_INST_EXEC.DIRECT_NEAR_CALLβ (Event88H, Umask90H) counts unconditional near call branch instructions, excluding non call branch, executed.BR_INST_EXEC.INDIRECT_NEAR_CALLβ (Event88H, UmaskA0H) counts indirect near calls, including both register and memory indirect, executed.BR_INST_EXEC.ALL_BRANCHESβ (Event88H, UmaskFFH) counts all near executed branches (not necessarily retired).BR_MISP_EXEC.NONTAKEN_CONDβ (Event89H, Umask41H) counts conditional near branch instructions mispredicted as nontaken π¬BR_MISP_EXEC.TAKEN_CONDβ (Event89H, Umask81H) counts conditional near branch instructions mispredicted as taken.BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RETβ (Event89H, Umask84H) counts mispredicted indirect near branch instructions that are not calls nor returns.BR_MISP_EXEC.RETURN_NEARβ (Event89H, Umask88H) counts mispredicted indirect near branches that have a return mnemonic.BR_MISP_EXEC.DIRECT_NEAR_CALLβ (Event89H, Umask90H) counts mispredicted unconditional near call branch instructions, excluding non call branch, executed.BR_MISP_EXEC.INDIRECT_NEAR_CALLβ (Event89H, UmaskA0H) counts mispredicted indirect near calls, including both register and memory indirect, executed.
and there's still more where that came from, don't you dare close the tab πΈ
BR_MISP_EXEC.ALL_BRANCHESβEvent 89H, Umask FFHβ counts every mispredicted near executed branch (and no, they don't have to be retired, bestie, that's the whole point π )IDQ_UOPS_NOT_DELIVERED.COREβEvent 9CH, Umask 01Hβ counts how many uops didn't get delivered to RAT, per thread. Use Cmask to qualify the uop b/w πUOPS_DISPATCHED_PORT.PORT_0βEvent A1H, Umask 01Hβ cycles where a uop gets dispatched on port 0.UOPS_DISPATCHED_PORT.PORT_1βEvent A1H, Umask 02Hβ cycles where a uop gets dispatched on port 1.UOPS_DISPATCHED_PORT.PORT_2_LDβEvent A1H, Umask 04Hβ cycles where a load uop gets dispatched on port 2 πΈUOPS_DISPATCHED_PORT.PORT_2_STAβEvent A1H, Umask 08Hβ cycles where a store address uop gets dispatched on port 2.UOPS_DISPATCHED_PORT.PORT_2βEvent A1H, Umask 0CHβ cycles where a uop gets dispatched on port 2, any kind.UOPS_DISPATCHED_PORT.PORT_3_LDβEvent A1H, Umask 10Hβ cycles where a load uop gets dispatched on port 3.UOPS_DISPATCHED_PORT.PORT_3_STAβEvent A1H, Umask 20Hβ cycles where a store address uop gets dispatched on port 3.UOPS_DISPATCHED_PORT.PORT_3βEvent A1H, Umask 30Hβ (Cycles which a Uop is dispatched on port 3.) β yes the original really does wrap the whole thing in parens, we keep the parens, we respect the parens π«ΆUOPS_DISPATCHED_PORT.PORT_4βEvent A1H, Umask 40Hβ cycles where a uop gets dispatched on port 4.UOPS_DISPATCHED_PORT.PORT_5βEvent A1H, Umask 80Hβ cycles where a uop gets dispatched on port 5.RESOURCE_STALLS.ANYβEvent A2H, Umask 01Hβ cycles where allocation is stalled for any resource-related reason πRESOURCE_STALLS.LBβEvent A2H, Umask 02Hβ counts stall cycles caused by not having enough load buffers.RESOURCE_STALLS.LBβEvent A2H, Umask 04Hβ cycles stalled because no eligible RS entry was available. (And yeah β the page listsRESOURCE_STALLS.LBtwice with two different umasks, so here it is twice too. Not a typo on my end, fr fr π)RESOURCE_STALLS.SBβEvent A2H, Umask 08Hβ cycles stalled because no store buffers were available (and that's not counting draining form sync).RESOURCE_STALLS.ROBβEvent A2H, Umask 10Hβ cycles stalled because the re-order buffer was full.RESOURCE_STALLS.FCSWβEvent A2H, Umask 20Hβ cycles stalled from writing the FPU control word.RESOURCE_STALLS.MXCSRβEvent A2H, Umask 40Hβ cycles stalled because the MXCSR register rename happened too close to a previous MXCSR rename.RESOURCE_STALLS.OTHERβEvent A2H, Umask 80Hβ cycles stalled while execution was stuck on other resource issues πDSB2MITE_SWITCHES.COUNTβEvent ABH, Umask 01Hβ number of DSB β MITE switches.DSB2MITE_SWITCHES.PENALTY_CYCLESβEvent ABH, Umask 02Hβ the cycles of delay those DSB β MITE switches caused β¨DSB_FILL.OTHER_CANCELβEvent ACH, Umask 02Hβ cases where a valid DSB fill got cancelled for some reason other than blowing past the way limit.DSB_FILL.EXCEED_DSB_LINESβEvent ACH, Umask 08Hβ DSB Fill hit more than 3 DSB lines.DSB_FILL.ALL_CANCELβEvent ACH, Umask 0AHβ cases where a valid Decode Stream Buffer (DSB) fill got cancelled, again not because of exceeding the way limit.ITLB.ITLB_FLUSHβEvent AEH, Umask 01Hβ counts ITLB flushes, and it covers4k/2M/4Mpages πOFFCORE_REQUESTS.DEMAND_DATA_RDβEvent B0H, Umask 01Hβ demand data read requests that got sent to uncore.OFFCORE_REQUESTS.DEMAND_RFOβEvent B0H, Umask 04Hβ demand RFO read requests sent to uncore, including regular RFOs, locks, and ItoM.OFFCORE_REQUESTS.ALL_DATA_RDβEvent B0H, Umask 08Hβ data read requests sent to uncore, both demand and prefetch π¦UOPS_DISPATCHED.THREADβEvent B1H, Umask 01Hβ counts the total uops to be dispatched per-thread each cycle. SetCmask = 1,INV =1to count stall cycles πUOPS_DISPATCHED.COREβEvent B1H, Umask 02Hβ counts total uops to be dispatched per-core each cycle. You do not need to set ANY.OFFCORE_REQUESTS_BUFFER.SQ_FULLβEvent B2H, Umask 01Hβ the offcore requests buffer can't take any more entries for this thread core π΅AGU_BYPASS_CANCEL.COUNTβEvent B6H, Umask 01Hβ counts executed load operations that have all of these traits:- addressing of the format
[base + offset] - the offset is between
1and2047 - the address specified in the base register is in one page and the address
[base+offset]is in another page
- addressing of the format
OFF_CORE_RESPONSE_0βEvent B7H, Umask 01Hβ Off-core Response Performance Monitoring; PMC0 only. Requires programming MSR01A6Hπ₯OFF_CORE_RESPONSE_1βEvent BBH, Umask 01Hβ Off-core Response Performance Monitoring. PMC3 only. Requires programming MSR01A7HTLB_FLUSH.DTLB_THREADβEvent BDH, Umask 01Hβ DTLB flush attempts of the thread-specific entries.TLB_FLUSH.STLB_ANYβEvent BDH, Umask 20Hβ counts the number of STLB flush attempts.L1D_BLOCKS.BANK_CONFLICT_CYCLESβEvent BFH, Umask 05Hβ cycles where dispatched loads get cancelled because of L1D bank conflicts with other load ports.cmask=1INST_RETIRED.ANY_PβEvent C0H, Umask 00Hβ number of instructions at retirement πINST_RETIRED.PREC_DISTβEvent C0H, Umask 01Hβ precise instruction retired event, with hardware to reduce the effect of PEBS shadow in IP distribution. PMC1 only; you must quiesce other PMCs β οΈINST_RETIRED.X87βEvent C0H, Umask 02Hβ X87 instruction retired event.OTHER_ASSISTS.ITLB_MISS_RETIREDβEvent C1H, Umask 02Hβ instructions that experienced an ITLB miss.OTHER_ASSISTS.AVX_STOREβEvent C1H, Umask 08Hβ number of assists tied to 256-bit AVX store operations.OTHER_ASSISTS.AVX_TO_SSEβEvent C1H, Umask 10Hβ number of transitions from AVX256 to legacy SSE when the penalty applies.OTHER_ASSISTS.SSE_TO_AVXβEvent C1H, Umask 20Hβ number of transitions from SSE to AVX-256 when the penalty applies π«UOPS_RETIRED.ALLβEvent C2H, Umask 01Hβ counts the number of micro-ops retired. Usecmask=1and invert to count active cycles or stalled cycles.UOPS_RETIRED.RETIRE_SLOTSβEvent C2H, Umask 02Hβ counts the number of retirement slots used each cycle.MACHINE_CLEARS.MEMORY_ORDERINGβEvent C3H, Umask 02Hβ counts machine clears caused by memory order conflicts π€MACHINE_CLEARS.SMCβEvent C3H, Umask 04Hβ counts how many times a program writes to a code section.MACHINE_CLEARS.MASKMOVβEvent C3H, Umask 20Hβ counts executed AVX masked load operations that refer to an illegal address range with the mask bits set to0.BR_INST_RETIRED.ALL_BRANCHβEvent C4H, Umask 00Hβ branch instructions at retirement.BR_INST_RETIRED.CONDITIONALβEvent C4H, Umask 01Hβ counts conditional branch instructions retired.BR_INST_RETIRED.NEAR_CALLβEvent C4H, Umask 02Hβ direct and indirect near call instructions retired.BR_INST_RETIRED.ALL_BRANCHESβEvent C4H, Umask 04Hβ counts branch instructions retired.BR_INST_RETIRED.NEAR_RETURNβEvent C4H, Umask 08Hβ counts near return instructions retired πBR_INST_RETIRED.NOT_TAKENβEvent C4H, Umask 10Hβ counts not-taken branch instructions retired.BR_INST_RETIRED.NEAR_TAKENβEvent C4H, Umask 20Hβ number of near taken branches retired.BR_INST_RETIRED.FAR_BRANCHβEvent C4H, Umask 40Hβ number of far branches retired.BR_MISP_RETIRED.ALL_BRANCHESβEvent C5H, Umask 00Hβ mispredicted branch instructions at retirement πBR_MISP_RETIRED.CONDITIONALβEvent C5H, Umask 01Hβ mispredicted conditional branch instructions retired.BR_MISP_RETIRED.NEAR_CALLβEvent C5H, Umask 02Hβ direct and indirect mispredicted near call instructions retired.BR_MISP_RETIRED.ALL_BRANCHβEvent C5H, Umask 04Hβ mispredicted macro branch instructions retired.BR_MISP_RETIRED.NOT_TAKENβEvent C5H, Umask 10Hβ mispredicted not-taken branch instructions retired.BR_MISP_RETIRED.TAKENβEvent C5H, Umask 20Hβ mispredicted taken branch instructions retired.FP_ASSIST.X87_OUTPUTβEvent CAH, Umask 02Hβ number of X87 assists caused by the output value.FP_ASSIST.X87_INPUTβEvent CAH, Umask 04Hβ number of X87 assists caused by the input value.FP_ASSIST.SIMD_OUTPUTβEvent CAH, Umask 08Hβ number of SIMD FP assists due to output values.FP_ASSIST.SIMD_INPUTβEvent CAH, Umask 10Hβ number of SIMD FP assists due to input values.FP_ASSIST.ANYβEvent CAH, Umask 1EHβ cycles with any input/output SSE* or FP assists πROB_MISC_EVENTS.LBR_INSERTSβEvent CCH, Umask 20Hβ counts the cases where hardware saves new LBR records.MEM_TRANS_RETIRED.LOAD_LATENCYβEvent CDH, Umask 01Hβ samples loads with a specified latency threshold. PMC3 only. You specify the threshold in MSR0x3F6πMEM_TRANS_RETIRED.PRECISE_STOREβEvent CDH, Umask 02Hβ samples stores and collects precise store operations via PEBS record. PMC3 only.MEM_UOP_RETIRED.LOADSβEvent D0H, Umask 01Hβ qualifies retired memory uops that are loads. Combine with umask10H,20H,40H,80H.MEM_UOP_RETIRED.STORESβEvent D0H, Umask 02Hβ qualifies retired memory uops that are stores. Combine with umask10H,20H,40H,80H.MEM_UOP_RETIRED.STLB_MISSβEvent D0H, Umask 10Hβ qualifies retired memory uops with an STLB miss. Must combine with umask01H,02Hto produce counts.MEM_UOP_RETIRED.LOCKβEvent D0H, Umask 20Hβ qualifies retired memory uops that have a lock. Must combine with umask01H,02Hto produce counts.MEM_UOP_RETIRED.SPLITβEvent D0H, Umask 40Hβ qualifies retired memory uops with a line split. Must combine with umask01H,02Hto produce counts.MEM_UOP_RETIRED_ALLβEvent D0H, Umask 80Hβ qualifies any retired memory uops. Must combine with umask01H,02Hto produce counts π«ΆMEM_LOAD_UOPS_RETIRED.L1_HITβEvent D1H, Umask 01Hβ retired load uops with L1 cache hits as their data sources. Must combine with umask01H,02Hto produce counts β¨MEM_LOAD_UOPS_RETIRED.L2_HITβ (EventD1H, Umask02H) retired load uops whose data sources were L2 cache hits. cute, close, fast. πMEM_LOAD_UOPS_RETIRED.LLC_HITβ (EventD1H, Umask04H) retired load uops whose data sources were data hits in the LLC with no snoops required. no drama, no cross-core gossip. β¨MEM_LOAD_UOPS_RETIRED.HIT_LFBβ (EventD1H, Umask40H) retired load uops whose data sources were load uops that missed L1 but hit FB, because a preceding miss to the same cache line had its data not ready yet. it's giving "waiting in the group chat for someone to send the screenshot." πMEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISSβ (EventD2H, Umask01H) retired load uops whose data sources were an LLC hit with a cross-core snoop that missed in an on-pkg core cache. πMEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITβ (EventD2H, Umask02H) retired load uops whose data sources were LLC and cross-core snoop hits in an on-pkg core cache. she found it AND it was mutual. π«ΆMEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITMβ (EventD2H, Umask04H) retired load uops whose data sources were HitM responses from the shared LLC. main character cache line, honestly. πMEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONEβ (EventD2H, Umask08H) retired load uops whose data sources were hits in the LLC with no snoops required. lowkey the chillest one here. πΈMEM_LOAD_UOPS_LLC_HIT_RETIRED.LLC_MISSβ (EventD4H, Umask02H) retired load uops with unknown information as the data source in the cache that serviced the load. literally "idk her" energy. πL2_TRANS.DEMAND_DATA_RDβ (EventF0H, Umask01H) demand Data Read requests that access the L2 cache. π₯L2_TRANS.RF0β (EventF0H, Umask02H) RFO requests that access the L2 cache. (yes,RF0with a zero, that's how it's spelled here β don't come for me, I'm just the messenger π)L2_TRANS.CODE_RDβ (EventF0H, Umask04H) L2 cache accesses when fetching instructions. brain food. π§L2_TRANS.ALL_PFβ (EventF0H, Umask08H) L2 or LLC hardware prefetches that access the L2 cache. manifesting the data before you even ask. β¨L2_TRANS.L1D_WBβ (EventF0H, Umask10H) L1D writebacks that access the L2 cache. π€L2_TRANS.L2_FILLβ (EventF0H, Umask20H) L2 fill requests that access the L2 cache. πL2_TRANS.L2_WBβ (EventF0H, Umask40H) L2 writebacks that access the L2 cache. πL2_TRANS.ALL_REQUESTSβ (EventF0H, Umask80H) transactions accessing the L2 pipe. the whole friend group, all at once. πL2_LINES_IN.Iβ (EventF1H, Umask01H) L2 cache lines in the I state filling the L2. Counting does not cover rejects. πL2_LINES_IN.Sβ (EventF1H, Umask02H) L2 cache lines in the S state filling the L2. Counting does not cover rejects. πL2_LINES_IN.Eβ (EventF1H, Umask04H) L2 cache lines in the E state filling the L2. Counting does not cover rejects. βL2_LINES-IN.ALLβ (EventF1H, Umask07H) L2 cache lines filling the L2. Counting does not cover rejects. and yes bestie, that's a hyphen in the name, not a dot β I am copying it exactly as it's written, do not @ me. πL2_LINES_OUT.DEMAND_CLEANβ (EventF2H, Umask01H) clean L2 cache lines evicted by demand. she left on her own terms. πL2_LINES_OUT.DEMAND_DIRTYβ (EventF2H, Umask02H) dirty L2 cache lines evicted by demand. messy exit, but make it demand. πL2_LINES_OUT.PF_CLEANβ (EventF2H, Umask04H) clean L2 cache lines evicted by an L2 prefetch. πΈL2_LINES_OUT.PF_DIRTYβ (EventF2H, Umask08H) dirty L2 cache lines evicted by an L2 prefetch. πL2_LINES_OUT.DIRTY_ALLβ (EventF2H, Umask0AH) dirty L2 cache lines filling the L2. Counting does not cover rejects. note the umask is0AHβ that's a letter A, bestie, not a typo. π₯SQ_MISC.SPLIT_LOCKβ (EventF4H, Umask10H) split locks in the SQ. the final boss of this list. π
π SEE ALSO π
okay so these are the other pages you should go read next, and honestly they're all a vibe:
pmc(3)pmc.amd(3)pmc.atom(3)pmc.core(3)pmc.corei7(3)pmc.corei7uc(3)pmc.iaf(3)pmc.ivybridge(3)pmc.ivybridgexeon(3)pmc.sandybridgeuc(3)pmc.sandybridgexeon(3)pmc.soft(3)pmc.tsc(3)pmc.ucf(3)pmc.westmere(3)pmc.westmereuc(3)pmc_cpuinfo(3)pmclog(3)hwpmc(4)
like, go read them, i'll wait. π
π°οΈ HISTORY π°οΈ
The pmc library first appeared in FreeBSD 6.0. vintage. iconic. a whole elder statesman. β¨
π«Ά AUTHORS π«Ά
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. π
The support for the Sandy Bridge microarchitecture was written by Davide Italiano <davide@FreeBSD.org>. π
put some respect on their names, fr fr. π
π and that's a wrap on the whole page, bestie! this one comes from Debian, dated October 19, 2012 β yes, she's a lil vintage, and she still ate. go count some L2 lines for me, ily, bye! π¦πΈπ
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2012 Davide Italiano <davide@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms