PMC.IVYBRIDGE(3)
๐ NAME ๐
pmc.ivybridge โ measurement events for Intel Ivy Bridge family CPUs ๐ (yes bestie, this is the whole manual page for it, and it's a lot, so buckle up)
๐ LIBRARY ๐
Performance Counters Library (libpmc, -lpmc) โจ
๐ง SYNOPSIS ๐ง
#include <pmc.h>
That's it. That's the whole synopsis. Slay. ๐
๐ธ DESCRIPTION ๐ธ
okay so Intel Ivy Bridge CPUs contain PMCs that conform to version 2 of the Intel performance measurement architecture. No cap. 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.
The number of PMCs available in each class and their widths? You literally have to figure that out at run time by calling pmc_cpuinfo(3). Can't skip that step, bestie. ๐ซถ
Intel Ivy Bridge PMCs are documented in โVolume 3B: System Programming Guide, Part 2โ, Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Order Number: 253669-043US, Intel Corporation, May 2012. (iykyk ๐)
๐ IVYBRIDGE FIXED FUNCTION PMCS ๐
These PMCs and their supported events are documented in pmc.iaf(3). Go check that one out, bestie. ๐ฆ
โจ IVYBRIDGE PROGRAMMABLE PMCS โจ
The programmable PMCs support the following capabilities:
PMC_CAP_CASCADEโ No ๐PMC_CAP_EDGEโ Yes โPMC_CAP_INTERRUPTโ Yes โPMC_CAP_INVERTโ Yes โPMC_CAP_READโ Yes โPMC_CAP_PRECISEโ No ๐ญPMC_CAP_SYSTEMโ Yes โPMC_CAP_TAGGINGโ No ๐PMC_CAP_THRESHOLDโ Yes โPMC_CAP_USERโ Yes โPMC_CAP_WRITEโ Yes โ
๐ฆ Event Qualifiers ๐ฆ
Event specifiers for these PMCs support the following common qualifiers:
rsp=valueโ configure the Off-core Response bits. the way this one works is it's a whole menu of sub-values, so here they all are, no skipping:REQ_DMND_DATA_RDโ counts the number of demand and DCU prefetch data reads of full and partial cachelines, plus 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 a 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 prefetcher.REQ_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. the "idc pick one" of the bunch ๐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. it's giving "minimum effort required" energy โจ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. one and done, periodt. ๐ฏ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. flip it and reverse it ๐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. you get both by default bestie, don't stress ๐ซถ
๐ Event Specifiers (Programmable PMCs) ๐
Ivy Bridge programmable PMCs support the following events:
LD_BLOCKS.STORE_FORWARDโ (Event 03H,Umask 02H) loads blocked by overlapping with store buffer that cannot be forwarded .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.DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALKโ (Event 08H,Umask 81H) misses in all TLB levels that cause a page walk of any page size from demand loads.DTLB_LOAD_MISSES.DEMAND_LD_WALK_COMPLETEDโ (Event 08H,Umask 82H) misses in all TLB levels that caused page walk completed of any size by demand loads.DTLB_LOAD_MISSES.DEMAND_LD_WALK_DURATIONโ (Event 08H,Umask 84H) cycle PMH is busy with a walk due to demand loads.UOPS_ISSUED.ANYโ (Event 0EH,Umask 01H) increments each cycle the # of Uops issued by the RAT to RS. SetCmask = 1,Inv = 1to count stalled cycles. SetCmask = 1,Inv = 1,Any = 1to count stalled cycles of this core.UOPS_ISSUED.FLAGS_MERGEโ (Event 0EH,Umask 10H) number of flags-merge uops allocated. Such uops adds delay. ๐ดUOPS_ISSUED.SLOW_LEAโ (Event 0EH,Umask 20H) number of slow LEA or similar uops allocated. Such uop has 3 sources (e.g. 2 sources + immediate) regardless if as a result of LEA instruction or not.UOPS_ISSUED.SINGLE_MULโ (Event 0EH,Umask 40H) number of multiply packed/scalar single precision uops allocated.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. ๐ฅ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.L2_RQSTS.RFO_MISSโ (Event 24H,Umask 08H) counts the number of store RFO requests that miss the L2 cache.L2_RQSTS.ALL_RFOโ (Event 24H,Umask 0CH) counts all L2 store RFO requests.L2_RQSTS.CODE_RD_HITโ (Event 24H,Umask 10H) number of instruction fetches that hit the L2 cache.L2_RQSTS.CODE_RD_MISSโ (Event 24H,Umask 20H) number of instruction fetches that missed the L2 cache.L2_RQSTS.ALL_CODE_RDโ (Event 24H,Umask 30H) counts all L2 code requests.L2_RQSTS.PF_HITโ (Event 24H,Umask 40H) counts all L2 HW prefetcher requests that hit L2.L2_RQSTS.PF_MISSโ (Event 24H,Umask 80H) counts all L2 HW prefetcher requests that missed L2.L2_RQSTS.ALL_PFโ (Event 24H,Umask C0H) counts all L2 HW prefetcher requests.L2_STORE_LOCK_RQSTS.MISSโ (Event 27H,Umask 01H) RFOs that miss cache lines.L2_STORE_LOCK_RQSTS.HIT_Mโ (Event 27H,Umask 08H) RFOs that hit cache lines in M state.L2_STORE_LOCK_RQSTS.ALLโ (Event 27H,Umask 0FH) RFOs that access cache lines in any state.L2_L1D_WB_RQSTS.MISSโ (Event 28H,Umask 01H) not rejected writebacks that missed LLC.L2_L1D_WB_RQSTS.HIT_Eโ (Event 28H,Umask 04H) not rejected writebacks from L1D to L2 cache lines in E state.L2_L1D_WB_RQSTS.HIT_Mโ (Event 28H,Umask 08H) not rejected writebacks from L1D to L2 cache lines in M state.L2_L1D_WB_RQSTS.ALLโ (Event 28H,Umask 0FH) not rejected writebacks from L1D to L2 cache lines in any state.
...and that's only part 1 bestie, there's literally more coming, stay tuned ๐
LONGEST_LAT_CACHE.REFERENCEโ (Event2EH, Umask4FH) counts the requests that come from the core and reference a cache line in the last level cache. core asks, LLC answers ๐LONGEST_LAT_CACHE.MISSโ (Event2EH, Umask41H) counts every cache miss condition for references to the last level cache. sad little miss ๐ฅฒ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 bestie: the core frequency may change from time to time due to power or thermal throttling. so your numbers can vibe-shift on you, no capCPU_CLK_THREAD_UNHALTED.REF_XCLKโ (Event3CH, Umask01H) increments at the frequency of XCLK (100 MHz) when not halted. steady beat energy ๐ตL1D_PEND_MISS.PENDINGโ (Event48H, Umask01H) increments the number of outstanding L1D misses every cycle. SetCmaks= 1 andEdge=1 to count occurrences. Counter 2 only. SetCmask= 1 to count cycles.DTLB_STORE_MISSES.MISS_CAUSES_A_WALKโ (Event49H, Umask01H) a miss in all TLB levels causes a page walk of any page size (4K/2M/4M/1G). all sizes invited to the function ๐ซถDTLB_STORE_MISSES.WALK_COMPLETEDโ (Event49H, Umask02H) a miss in all TLB levels causes a page walk that completes, of any page size (4K/2M/4M/1G).DTLB_STORE_MISSES.WALK_DURATIONโ (Event49H, Umask04H) cycles PMH is busy with this walk. PMH said "busy, don't @ me" ๐ญ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. missed the first one, caught the second, no walk needed, slayLOAD_HIT_PRE.SW_PFโ (Event4CH, Umask01H) non-SW-prefetch load dispatches that hit a fill buffer allocated for S/W prefetch.LOAD_HIT_PRE.HW_PFโ (Event4CH, Umask02H) non-SW-prefetch load dispatches that hit a fill buffer allocated for H/W prefetch. same vibe, hardware edition โจL1D.REPLACEMENTโ (Event51H, Umask01H) counts the number of lines brought into the L1 data cache. moving in, new crib ๐MOVE_ELIMINATION.INT_NOT_ELIMINATEDโ (Event58H, Umask01H) the number of integer Move Elimination candidate uops that were not eliminated. they didn't make the cut bestie ๐MOVE_ELIMINATION.SIMD_NOT_ELIMINATEDโ (Event58H, Umask02H) the number of SIMD Move Elimination candidate uops that were not eliminated.MOVE_ELIMINATION.INT_ELIMINATEDโ (Event58H, Umask04H) the number of integer Move Elimination candidate uops that were eliminated. iconic behaviour, ate and left no crumbs ๐MOVE_ELIMINATION.SIMD_ELIMINATEDโ (Event58H, Umask08H) the number of SIMD Move Elimination candidate uops that were eliminated.CPL_CYCLES.RING0โ (Event5CH, Umask01H) unhalted core cycles when the thread is in ring 0. UseEdgeto count transition. ring 0 is the VIP section obviously ๐CPL_CYCLES.RING123โ (Event5CH, Umask02H) unhalted core cycles when the thread is not in ring 0. the rest of us, in the nosebleedsRS_EVENTS.EMPTY_CYCLESโ (Event5EH, Umask01H) cycles the RS is empty for the thread. nothing in the queue, tumbleweed hours ๐ตTLB_ACCESS.LOAD_STLB_HITโ (Event5FH, Umask01H) counts load operations that missed the 1st level DTLB but hit the 2nd level.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_CODE_RDโ (Event60H, Umask02H) offcore outstanding Demand Code 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. all four of these are the "how many are still in flight" squad ๐ซ
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. both caches in lockdown, dramatic ๐LOCK_CYCLES.CACHE_LOCK_DURATIONโ (Event63H, Umask02H) cycles in which the L1D is locked.IDQ.EMPTYโ (Event79H, Umask02H) counts cycles the IDQ is empty. ghost town ๐ปIDQ.MITE_UOPSโ (Event79H, Umask04H) increment each cycle # of uops delivered to IDQ from the MITE path. Can combine Umask04Hand20H. SetCmask= 1 to count cycles.IDQ.DSB_UOPSโ (Event79H, Umask08H) increment each cycle # of uops delivered to IDQ from the DSB path. Can combine Umask08Hand10HSetCmask= 1 to count cycles.IDQ.MS_DSB_UOPSโ (Event79H, Umask10H) increment each cycle # of uops delivered to IDQ when MS_busy by DSB. SetCmask= 1 to count cycles. AddEdge=1to count # of delivery. Can combine Umask04H,08H.IDQ.MS_MITE_UOPSโ (Event79H, Umask20H) increment each cycle # of uops delivered to IDQ when MS_busy by MITE. SetCmask= 1 to count cycles. Can combine Umask04H,08H.IDQ.MS_UOPSโ (Event79H, Umask30H) increment each cycle # of uops delivered to IDQ from MS by either DSB or MITE. SetCmask= 1 to count cycles. Can combine Umask04H,08H. equal opportunity delivery service ๐IDQ.ALL_DSB_CYCLES_ANY_UOPSโ (Event79H, Umask18H) counts cycles DSB is delivered at least one uops. SetCmask= 1. just one uop is enough to count, low standards, love thatIDQ.ALL_DSB_CYCLES_4_UOPSโ (Event79H, Umask18H) counts cycles DSB is delivered four uops. SetCmask= 4.
okay AND notice these two share the same Event/Umask (79H/18H) and24H/3CHpairs do the same โ theCmaskvalue is what tells them apart. Do not mix them up, bestie. ๐
IDQ.ALL_MITE_CYCLES_ANY_UOPSโ (Event79H, Umask24H) counts cycles MITE is delivered at least one uops. SetCmask= 1.IDQ.ALL_MITE_CYCLES_4_UOPSโ (Event79H, Umask24H) counts cycles MITE is delivered four uops. SetCmask= 4.IDQ.MITE_ALL_UOPSโ (Event79H, Umask3CH) # of uops delivered to IDQ from any path. ANY path!! the whole multiverse ๐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. no walk, we stay put ๐งILD_STALL.LCPโ (Event87H, Umask01H) stalls caused by changing prefix length of the instruction. the prefix changed and now everyone's waiting ๐ILD_STALL.IQ_FULLโ (Event87H, Umask04H) stall cycles due to IQ is full.
BR_INST_EXEC.NONTAKEN_CONDโ (Event88H, Umask41H) count conditional near branch instructions that were executed (but not necessarily retired) and not taken.BR_INST_EXEC.TAKEN_CONDโ (Event88H, Umask81H) count conditional near branch instructions that were executed (but not necessarily retired) and taken. they said yes ๐BR_INST_EXEC.DIRECT_JMPโ (Event88H, Umask82H) count all unconditional near branch instructions excluding calls and indirect branches.BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RETโ (Event88H, Umask84H) count executed indirect near branch instructions that are not calls nor returns.BR_INST_EXEC.RETURN_NEARโ (Event88H, Umask88H) count indirect near branches that have a return mnemonic.BR_INST_EXEC.DIRECT_NEAR_CALLโ (Event88H, Umask90H) count unconditional near call branch instructions, excluding non call branch, executed.BR_INST_EXEC.INDIRECT_NEAR_CALLโ (Event88H, UmaskA0H) count 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). the whole population, everyone's invited ๐BR_MISP_EXEC.NONTAKEN_CONDโ (Event89H, Umask41H) count conditional near branch instructions mispredicted as nontaken.BR_MISP_EXEC.TAKEN_CONDโ (Event89H, Umask81H) count conditional near branch instructions mispredicted as taken. guessed wrong bestie ๐ญBR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RETโ (Event89H, Umask84H) count mispredicted indirect near branch instructions that are not calls nor returns.BR_MISP_EXEC.RETURN_NEARโ (Event89H, Umask88H) count mispredicted indirect near branches that have a return mnemonic.BR_MISP_EXEC.DIRECT_NEAR_CALLโ (Event89H, Umask90H) count mispredicted unconditional near call branch instructions, excluding non call branch, executed.BR_MISP_EXEC.INDIRECT_NEAR_CALLโ (Event89H, UmaskA0H) count mispredicted indirect near calls, including both register and memory indirect, executed.BR_MISP_EXEC.ALL_BRANCHESโ (Event89H, UmaskFFH) counts all mispredicted near executed branches (not necessarily retired).
quick vibe check: theBR_INST_EXECfam (88H) is all executed branches, theBR_MISP_EXECfam (89H) is only the mispredicted ones. Same Umask patterns, different event. iykyk โญ
IDQ_UOPS_NOT_DELIVERED.COREโ (Event9CH, Umask01H) count number of non-delivered uops to RAT per thread. UseCmaskto qualify uop b/w.UOPS_DISPATCHED_PORT.PORT_0โ (EventA1H, Umask01H) cycles which a Uop is dispatched on port 0.UOPS_DISPATCHED_PORT.PORT_1โ (EventA1H, Umask02H) cycles which a Uop is dispatched on port 1.UOPS_DISPATCHED_PORT.PORT_2_LDโ (EventA1H, Umask04H) cycles which a load uop is dispatched on port 2.UOPS_DISPATCHED_PORT.PORT_2_STAโ (EventA1H, Umask08H) cycles which a store address uop is dispatched on port 2.UOPS_DISPATCHED_PORT.PORT_2โ (EventA1H, Umask0CH) cycles which a Uop is dispatched on port 2. that's04H+08Hcombined, for the record โจUOPS_DISPATCHED_PORT.PORT_3_LDโ (EventA1H, Umask10H) cycles which a load uop is dispatched on port 3.UOPS_DISPATCHED_PORT.PORT_3_STAโ (EventA1H, Umask20H) cycles which a store address uop is dispatched on port 3.UOPS_DISPATCHED_PORT.PORT_3โ (EventA1H, Umask30H) cycles which a Uop is dispatched on port 3.UOPS_DISPATCHED_PORT.PORT_4โ (EventA1H, Umask40H) cycles which a Uop is dispatched on port 4.UOPS_DISPATCHED_PORT.PORT_5โ (EventA1H, Umask80H) cycles which a Uop is dispatched on port 5. port 5 deserves its flowers too ๐RESOURCE_STALLS.ANYโ (EventA2H, Umask01H) cycles Allocation is stalled due to Resource Related reason.RESOURCE_STALLS.RSโ (EventA2H, Umask04H) cycles stalled due to no eligible RS entry available. nowhere to go, just vibing in the queue ๐ซRESOURCE_STALLS.SBโ (EventA2H, Umask08H) cycles justโฆ stalled out because there were literally no store buffers available ๐ซ (and no, this does not include draining form sync).RESOURCE_STALLS.ROBโ (EventA2H, Umask08H... jk it's Umask10H) cycles stalled because the re-order buffer was full โ the whole thing was giving "no room at the inn" ๐ญDSB2MITE_SWITCHES.COUNTโ (EventABH, Umask01H) the number of DSB โ MITE switches. counting them. that's the vibe โจDSB2MITE_SWITCHES.PENALTY_CYCLESโ (EventABH, Umask02H) the cycles that DSB โ MITE switches cost you in delay ๐ธDSB_FILL.EXCEED_DSB_LINESโ (EventACH, Umask08H) DSB Fill bumped into more than 3 DSB lines. overachiever behavior, honestly ๐ITLB.ITLB_FLUSHโ (EventAEH, Umask01H) counts the number of ITLB flushes, and yes bestie it includes4k/2M/4Mpages ๐OFFCORE_REQUESTS.DEMAND_DATA_RDโ (EventB0H, Umask01H) demand data read requests sent off to uncore ๐จOFFCORE_REQUESTS.DEMAND_CODE_RDโ (EventB0H, Umask02H) demand code read requests sent off to uncore ๐จOFFCORE_REQUESTS.DEMAND_RFOโ (EventB0H, Umask04H) demand RFO read requests sent to uncore, and that's including regular RFOs, locks, and ItoM ๐ซถOFFCORE_REQUESTS.ALL_DATA_RDโ (EventB0H, Umask08H) data read requests sent to uncore โ both demand and prefetch, the whole crew ๐ธUOPS_EXECUTED.THREADโ (EventB1H, Umask01H) counts the total number of uops to be executed per-thread each cycle. SetCmask = 1,INV =1to count stall cycles ๐UOPS_EXECUTED.COREโ (EventB1H, Umask02H) counts the total number of uops to be executed per-core each cycle. Good news: you do not need to set ANY ๐OFF_CORE_RESPONSE_0โ (EventB7H, Umask01H) Off-core Response Performance Monitoring.PMC0only, and it requires programming MSR01A6Hโ ๏ธOFF_CORE_RESPONSE_1โ (EventBBH, Umask01H) Off-core Response Performance Monitoring.PMC3only, and it requires programming MSR01A7Hโ ๏ธTLB_FLUSH.DTLB_THREADโ (EventBDH, Umask01H) DTLB flush attempts of the thread-specific entries ๐งตTLB_FLUSH.STLB_ANYโ (EventBDH, Umask20H) count the number of STLB flush attempts ๐INST_RETIRED.ANY_Pโ (EventC0H, Umask00H) number of instructions at retirement ๐INST_RETIRED.ALLโ (EventC0H, Umask01H) precise instruction retired event with HW to reduce the effect of PEBS shadow in IP distribution.PMC1only, and you must quiesce other PMCs โ no cap, that part is not optional ๐คOTHER_ASSISTS.AVX_STOREโ (EventC1H, Umask08H) number of assists associated with256-bitAVX store operations ๐งฎOTHER_ASSISTS.AVX_TO_SSEโ (EventC1H, Umask10H) number of transitions from AVX-256to legacy SSE when a penalty is applicable ๐ฌOTHER_ASSISTS.SSE_TO_AVXโ (EventC1H, Umask20H) number of transitions from SSE to AVX-256when a penalty is applicable ๐ฌUOPS_RETIRED.ALLโ (EventC2H, Umask01H) counts the number of micro-ops retired. Usecmask=1and invert to count active cycles or stalled cycles. Supports PEBS, and useAny=1for core granular ๐UOPS_RETIRED.RETIRE_SLOTSโ (EventC2H, Umask02H) counts the number of retirement slots used each cycle ๐ฐMACHINE_CLEARS.MEMORY_ORDERINGโ (EventC3H, Umask02H) counts the number of machine clears due to memory order conflicts ๐ง ๐ฅMACHINE_CLEARS.SMCโ (EventC3H, Umask04H) number of self-modifying-code machine clears detected ๐ชMACHINE_CLEARS.MASKMOVโ (EventC3H, Umask20H) counts the number of executed AVX masked load operations that refer to an illegal address range with the mask bits set to0๐จBR_INST_RETIRED.ALL_BRANCHESโ (EventC4H, Umask00H) branch instructions at retirement ๐ฟBR_INST_RETIRED.CONDITIONALโ (EventC4H, Umask01H) counts the number of conditional branch instructions retired. Supports PEBS โจBR_INST_RETIRED.NEAR_CALLโ (EventC4H, Umask02H) direct and indirect near call instructions retired ๐BR_INST_RETIRED.ALL_BRANCHESโ (EventC4H, Umask04H) counts the number of branch instructions retired. (Yes, same name as the00Hone โ different umask, different era, don't come for me ๐ )BR_INST_RETIRED.NEAR_RETURNโ (EventC4H, Umask08H) counts the number of near return instructions retired ๐BR_INST_RETIRED.NOT_TAKENโ (EventC4H, Umask10H) counts the number of not taken branch instructions retired ๐BR_INST_RETIRED.NEAR_TAKENโ (EventC4H, Umask20H) number of near taken branches retired โBR_INST_RETIRED.FAR_BRANCHโ (EventC4H, Umask40H) number of far branches retired ๐ซBR_MISP_RETIRED.ALL_BRANCHESโ (EventC5H, Umask00H) mispredicted branch instructions at retirement ๐ฒBR_MISP_RETIRED.CONDITIONALโ (EventC5H, Umask01H) mispredicted conditional branch instructions retired. Supports PEBS โจBR_MISP_RETIRED.NEAR_CALLโ (EventC5H, Umask02H) direct and indirect mispredicted near call instructions retired ๐๐BR_MISP_RETIRED.ALL_BRANCHESโ (EventC5H, Umask04H) mispredicted macro branch instructions retired ๐ฒBR_MISP_RETIRED.NOT_TAKENโ (EventC5H, Umask10H) mispredicted not taken branch instructions retired ๐ ๐BR_MISP_RETIRED.TAKENโ (EventC5H, Umask20H) mispredicted taken branch instructions retired โ ๐FP_ASSIST.X87_OUTPUTโ (EventCAH, Umask02H) number of X87 FP assists due to Output values ๐คFP_ASSIST.X87_INPUTโ (EventCAH, Umask04H) number of X87 FP assists due to input values ๐ฅFP_ASSIST.SIMD_OUTPUTโ (EventCAH, Umask08H) number of SIMD FP assists due to Output values ๐คFP_ASSIST.SIMD_INPUTโ (EventCAH, Umask10H) number of SIMD FP assists due to input values ๐ฅFP_ASSIST.ANYโ (EventCAH, Umask1EH) cycles with any input/outputSSE*or FP assists ๐๏ธROB_MISC_EVENTS.LBR_INSERTSโ (EventCCH, Umask20H) counts cases of saving new LBR records by hardware ๐พMEM_TRANS_RETIRED.LOAD_LATENCYโ (EventCDH, Umask01H) sample loads with a specified latency threshold.PMC3only, and you specify the threshold in MSR0x3F6โ ๏ธMEM_TRANS_RETIRED.PRECISE_STOREโ (EventCDH, Umask02H) sample stores and collect precise store operation via PEBS record.PMC3only โ ๏ธMEM_UOPS_RETIRED.STLB_MISS_LOADSโ (EventD0H, Umask11H) count retired load uops that missed the STLB ๐ณ๏ธMEM_UOPS_RETIRED.STLB_MISS_STORESโ (EventD0H, Umask12H) count retired store uops that missed the STLB ๐ณ๏ธMEM_UOPS_RETIRED.SPLIT_LOADSโ (EventD0H, Umask41H) count retired load uops that were split across a cache line ๐ชMEM_UOPS_RETIRED.SPLIT_STORESโ (EventD0H, Umask42H) count retired store uops that were split across a cache line ๐ชMEM_UOPS_RETIRED.ALL_LOADSโ (EventD0H, Umask81H) count all retired load uops ๐MEM_UOPS_RETIRED.ALL_STORESโ (EventD0H, Umask82H) count all retired store uops ๐MEM_LOAD_UOPS_RETIRED.L1_HITโ (EventD1H, Umask01H) retired load uops with L1 cache hits as data sources. Supports PEBS โจMEM_LOAD_UOPS_RETIRED.L2_HITโ (EventD1H, Umask02H) retired load uops with L2 cache hits as data sources ๐ธMEM_LOAD_UOPS_RETIRED.LLC_HITโ (EventD1H, Umask04H) retired load uops with LLC cache hits as data sources ๐MEM_LOAD_UOPS_RETIRED.HIT_LFBโ (EventD1H, Umask40H) retired load uops which data sources were load uops that missed L1 but hit FB due to a preceding miss to the same cache line with data not ready ๐ฏMEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISSโ (EventD2H, Umask01H) retired load uops which data sources were LLC hit and cross-core snoop missed in on-pkg core cache. Supports PEBS โจMEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITโ (EventD2H, Umask02H) retired load uops which data sources were LLC and cross-core snoop hits in on-pkg core cache. Supports PEBS โจMEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITMโ (EventD2H, Umask04H) retired load uops which data sources were HitM responses from shared LLC ๐ซฑMEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONEโ (EventD2H, Umask08H) retired load uops which data sources were hits in LLC without snoops required ๐งMEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAMโ (EventD3H, Umask01H) retired load uops which data sources missed LLC but were serviced from local dram. Supports PEBS โจL2_TRANS.DEMAND_DATA_RDโ (EventF0H, Umask01H) demand Data Read requests that access L2 cache ๐ชL2_TRANS.RFOโ (EventF0H, Umask02H) RFO requests that access L2 cache ๐ชL2_TRANS.CODE_RDโ (EventF0H, Umask04H) L2 cache accesses when fetching instructions ๐L2_TRANS.ALL_PFโ (EventF0H, Umask08H) any MLC or LLC HW prefetch accessing L2, including rejects ๐๏ธL2_TRANS.L1D_WBโ (EventF0H, Umask10H) L1D writebacks that access L2 cache ๐L2_TRANS.L2_FILLโ (EventF0H, Umask20H) L2 fill requests that access L2 cache ๐งL2_TRANS.L2_WBโ (EventF0H, Umask40H) L2 writebacks that access L2 cache ๐L2_TRANS.ALL_REQUESTSโ (EventF0H, Umask80H) transactions accessing L2 pipe ๐ฃ๏ธL2_LINES_IN.Iโ (EventF1H, Umask01H) L2 cache lines inIstate filling L2. Counting does not cover rejects ๐ซL2_LINES_IN.Sโ (EventF1H, Umask02H) L2 cache lines inSstate filling L2. Counting does not cover rejects ๐ซL2_LINES_IN.Eโ (EventF1H, Umask04H) L2 cache lines inEstate filling L2. Counting does not cover rejects ๐ซL2_LINES_IN.ALLโ (EventF1H, Umask07H) L2 cache lines filling L2. Counting does not cover rejects ๐ซL2_LINES_OUT.DEMAND_CLEANโ (EventF2H, Umask01H) clean L2 cache lines evicted by demand ๐งนL2_LINES_OUT.DEMAND_DIRTYโ (EventF2H, Umask02H) dirty L2 cache lines evicted by demand ๐งนL2_LINES_OUT.PF_CLEANโ (EventF2H, Umask04H) clean L2 cache lines evicted by the MLC prefetcher ๐งนL2_LINES_OUT.PF_DIRTYโ (EventF2H, Umask08H) dirty L2 cache lines evicted by the MLC prefetcher ๐งน
๐ SEE ALSO ๐
Go read these next, bestie โ the whole squad is here and they all ate ๐
pmc(3), pmc.amd(3), pmc.atom(3), pmc.core(3), pmc.corei7(3), pmc.corei7uc(3), pmc.iaf(3), pmc.ivybridgexeon(3), pmc.sandybridge(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)
๐ HISTORY ๐
The pmc library first appeared in FreeBSD 6.0 โ vintage icon behavior, we love a legacy queen ๐๐ฆ
โจ AUTHORS โจ
Okay so the Performance Counters Library โ that's libpmc, linked with -lpmc, bestie โ was written by Joseph Koshy <jkoshy@FreeBSD.org> ๐ซถ and honestly? iconic behavior. Respect where respect is due.
And the support for the Ivy Bridge microarchitecture specifically? That was written by Fabien Thomas <fabient@FreeBSD.org> ๐
slay.
That's the whole page, babe โ go forth and count those performance counters ๐ธ๐ฆ
Source & version: this one comes from the Debian packaging of PMC.IVYBRIDGE(3), dated October 19, 2012 ๐ signing off fr fr ๐โจ
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2012 Fabien Thomas. All rights reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms