PMC.WESTMERE(3)
๐ PMC.WESTMERE(3) โ Intel Westmere family CPUs, performance measurement events
okay so bestie. This is pmc.westmere, ok? It lives in the Library Functions Manual and it's the whole saga of measurement events for Intel Westmere family CPUs. Grab a snack, this one's long ๐ธ
๐ซถ LIBRARY
Performance Counters Library (libpmc, -lpmc)
โจ SYNOPSIS
#include <pmc.h>
๐ฆ DESCRIPTION
So like. Intel Westmere CPUs contain PMCs that conform to version 2 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.
The number of PMCs available in each class, and their widths, need to be determined at run time by calling pmc_cpuinfo(3) โจ
Intel Westmere PMCs are documented in โVolume 3B: System Programming Guide, Part 2โ, Intel(R) 64 and IA-32 Architectures Software Developes Manual, Order Number: 253669-033US, Intel Corporation, December 2009.
๐ WESTMERE FIXED FUNCTION PMCS
These PMCs and their supported events are documented in pmc.iaf(3).
๐ WESTMERE 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. The values you can feed it are: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.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.DMND_IFETCHโ counts the number of demand and DCU prefetch instruction cacheline reads. Does not count L2 code read prefetches. WB counts the number of writeback (modified to exclusive) transactions.PF_DATA_RDโ counts the number of data cacheline reads generated by L2 prefetchers.PF_RFOโ counts the number of RFO requests generated by L2 prefetchers.PF_IFETCHโ counts the number of code reads generated by L2 prefetchers.OTHERโ counts one of the following transaction types, including L3 invalidate, I/O, full or partial writes, WC or non-temporal stores, CLFLUSH, Fences, lock, unlock, split lock.UNCORE_HITโ L3 Hit: local or remote home requests that hit L3 cache in the uncore with no coherency actions required (snooping).OTHER_CORE_HIT_SNPโ L3 Hit: local or remote home requests that hit L3 cache in the uncore and was serviced by another core with a cross core snoop where no modified copies were found (clean).OTHER_CORE_HITMโ L3 Hit: local or remote home requests that hit L3 cache in the uncore and was serviced by another core with a cross core snoop where modified copies were found (HITM).REMOTE_CACHE_FWDโ L3 Miss: local homed requests that missed the L3 cache and was serviced by forwarded data following a cross package snoop where no modified copies found. (Remote home requests are not counted)REMOTE_DRAMโ L3 Miss: remote home requests that missed the L3 cache and were serviced by remote DRAM.LOCAL_DRAMโ L3 Miss: local home requests that missed the L3 cache and were serviced by local DRAM.NON_DRAMโ Non-DRAM requests that were serviced by IOH.
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)
Westmere programmable PMCs support the following events:
LOAD_BLOCK.OVERLAP_STOREโ (Event03H, Umask02H) Loads that partially overlap an earlier storeSB_DRAIN.ANYโ (Event04H, Umask07H) All Store buffer stall cyclesMISALIGN_MEMORY.STOREโ (Event05H, Umask02H) All store referenced with misaligned addressSTORE_BLOCKS.AT_RETโ (Event06H, Umask04H) Counts number of loads delayed with at-Retirement block code. The following loads need to be executed at retirement and wait for all senior stores on the same thread to be drained: load splitting across 4K boundary (page split), load accessing uncacheable (UC or USWC) memory, load lock, and load with page table in UC or USWC memory region.STORE_BLOCKS.L1D_BLOCKโ (Event06H, Umask08H) Cacheable loads delayed with L1D block codePARTIAL_ADDRESS_ALIASโ (Event07H, Umask01H) Counts false dependency due to partial address aliasingDTLB_LOAD_MISSES.ANYโ (Event08H, Umask01H) Counts all load misses that cause a page walkDTLB_LOAD_MISSES.WALK_COMPLETEDโ (Event08H, Umask02H) Counts number of completed page walks due to load miss in the STLB.DTLB_LOAD_MISSES.WALK_CYCLESโ (Event08H, Umask04H) Cycles PMH is busy with a page walk due to a load miss in the STLB.DTLB_LOAD_MISSES.STLB_HITโ (Event08H, Umask10H) Number of cache load STLB hitsDTLB_LOAD_MISSES.PDE_MISSโ (Event08H, Umask20H) Number of DTLB cache load misses where the low part of the linear to physical address translation was missed.MEM_INST_RETIRED.LOADSโ (Event0BH, Umask01H) Counts the number of instructions with an architecturally-visible store retired on the architected path. In conjunction withld_latfacilityMEM_INST_RETIRED.STORESโ (Event0BH, Umask02H) Counts the number of instructions with an architecturally-visible store retired on the architected path. In conjunction withld_latfacilityMEM_INST_RETIRED.LATENCY_ABOVE_THRESHOLDโ (Event0BH, Umask10H) Counts the number of instructions exceeding the latency specified withld_latfacility. In conjunction withld_latfacilityMEM_STORE_RETIRED.DTLB_MISSโ (Event0CH, Umask01H) The event counts the number of retired stores that missed the DTLB. The DTLB miss is not counted if the store operation causes a fault. Does not counter prefetches. Counts both primary and secondary misses to the TLBUOPS_ISSUED.ANYโ (Event0EH, Umask01H) Counts the number of Uops issued by the Register Allocation Table to the Reservation Station, i.e. the UOPs issued from the front end to the back end.UOPS_ISSUED.STALLED_CYCLESโ (Event0EH, Umask01H) Counts the number of cycles no Uops issued by the Register Allocation Table to the Reservation Station, i.e. the UOPs issued from the front end to the back end. setinvert=1,cmask = 1UOPS_ISSUED.FUSEDโ (Event0EH, Umask02H) Counts the number of fused Uops that were issued from the Register Allocation Table to the Reservation Station.MEM_UNCORE_RETIRED.LOCAL_HITMโ (Event0FH, Umask02H) Load instructions retired that HIT modified data in sibling core (Precise Event)MEM_UNCORE_RETIRED.LOCAL_DRAM_AND_REMOTE_CACHE_HITโ (Event0FH, Umask08H) Load instructions retired local dram and remote cache HIT data sources (Precise Event)MEM_UNCORE_RETIRED.LOCAL_DRAMโ (Event0FH, Umask10H) Load instructions retired with a data source of local DRAM or locally homed remote cache HITM (Precise Event)MEM_UNCORE_RETIRED.REMOTE_DRAMโ (Event0FH, Umask20H) Load instructions retired remote DRAM and remote home-remote cache HITM (Precise Event)MEM_UNCORE_RETIRED.UNCACHEABLEโ (Event0FH, Umask80H) Load instructions retired I/O (Precise Event)FP_COMP_OPS_EXE.X87โ (Event10H, Umask01H) Counts the number of FP Computational Uops Executed. The number of FADD, FSUB, FCOM, FMULs, integer MULsand IMULs, FDIVs, FPREMs, FSQRTS, integer DIVs, and IDIVs. This event does not distinguish an FADD used in the middle of a transcendental flow from a separate FADD instruction.FP_COMP_OPS_EXE.MMXโ (Event10H, Umask02H) Counts number of MMX Uops executed.FP_COMP_OPS_EXE.SSE_FPโ (Event10H, Umask04H) Counts number of SSE and SSE2 FP uops executed.FP_COMP_OPS_EXE.SSE2_INTEGERโ (Event10H, Umask08H) Counts number of SSE2 integer uops executed.FP_COMP_OPS_EXE.SSE_FP_PACKEDโ (Event10H, Umask10H) Counts number of SSE FP packed uops executed.FP_COMP_OPS_EXE.SSE_FP_SCALARโ (Event10H, Umask20H) Counts number of SSE FP scalar uops executed.FP_COMP_OPS_EXE.SSE_SINGLE_PRECISIONโ (Event10H, Umask40H) Counts number of SSE* FP single precision uops executed.FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION(Event 10H, Umask 80H)โ counts how many SSE* FP double precision uops actually got executed ๐SIMD_INT_128.PACKED_MPY(Event 12H, Umask 01H)โ counts 128 bit SIMD integer multiply operations โจSIMD_INT_128.PACKED_SHIFT(Event 12H, Umask 02H)โ counts 128 bit SIMD integer shift operations ๐SIMD_INT_128.PACK(Event 12H, Umask 04H)โ counts 128 bit SIMD integer pack operations ๐SIMD_INT_128.UNPACK(Event 12H, Umask 08H)โ counts 128 bit SIMD integer unpack operations ๐ฆSIMD_INT_128.PACKED_LOGICAL(Event 12H, Umask 10H)โ counts 128 bit SIMD integer logical operations ๐ธSIMD_INT_128.PACKED_ARITH(Event 12H, Umask 20H)โ counts 128 bit SIMD integer arithmetic operations ๐ฅSIMD_INT_128.SHUFFLE_MOVE(Event 12H, Umask 40H)โ counts 128 bit SIMD integer shuffle and move operations ๐LOAD_DISPATCH.RS(Event 13H, Umask 01H)โ counts the loads that got dispatched from the Reservation Station and straight up bypassed the Memory Order Buffer ๐คLOAD_DISPATCH.RS_DELAYED(Event 13H, Umask 02H)โ counts the delayed RS dispatches at the stage latch. So basically: if an RS dispatch can't bypass to LB, it gets one more shot from the one-cycle delayed staging latch before it's written into the LB ๐ซถLOAD_DISPATCH.MOB(Event 13H, Umask 04H)โ counts loads dispatched from the Reservation Station to the Memory Order Buffer ๐LOAD_DISPATCH.ANY(Event 13H, Umask 07H)โ counts all the loads dispatched from the Reservation Station, no crumbs left behind โญARITH.CYCLES_DIV_BUSY(Event 14H, Umask 01H)โ counts the cycles the divider is busy doing divide or square root stuff. The divide can be integer, X87 or Streaming SIMD Extensions (SSE); the square root can be X87 or SSE. Set'edge =1, invert=1, cmask=1'if what you actually want is the number of divides. Heads up though: the count may be incorrect when SMT is on ๐ARITH.MUL(Event 14H, Umask 02H)โ counts multiply operations executed โ integer and floating point โ but excludes DPPS mul and MPSAD. And yeah, count may be incorrect when SMT is on ๐INST_QUEUE_WRITES(Event 17H, Umask 01H)โ counts the instructions written into the instruction queue every cycle ๐ฅINST_DECODED.DEC0(Event 18H, Umask 01H)โ counts instructions that require decoder 0 to decode them. Usually that means the instruction maps to more than 1 uop ๐TWO_UOP_INSTS_DECODED(Event 19H, Umask 01H)โ an instruction that generates two uops got decoded, and we're counting it โ๏ธINST_QUEUE_WRITE_CYCLES(Event 1EH, Umask 01H)โ counts the cycles where instructions are being written to the instruction queue. Divide this counter byINST_QUEUE_WRITESand boom, you've got the average number of instructions decoded per cycle ๐งฎ
If that number comes out less than four and the pipe stalls? That's your sign the decoder isn't decoding enough per cycle to feed the 4-wide pipeline ๐ฌ And if SSE* instructions that are 6 bytes or longer keep arriving one after another, front end throughput might be capping your execution speed. In such case,
ngl bestie the original page just cuts off right there mid-sentence ๐ "In such case," and thenโฆ nothing. iconic of it honestly.
LSD_OVERFLOW(Event 20H, Umask 01H)โ the number of loops that can't stream from the instruction queue ๐ญL2_RQSTS.LD_HIT(Event 24H, Umask 01H)โ counts loads that hit the L2 cache. L2 loads include both L1D demand misses and L1D prefetches. L2 loads can get rejected for a bunch of reasons, and only the non-rejected ones get counted ๐L2_RQSTS.LD_MISS(Event 24H, Umask 02H)โ counts loads that miss the L2 cache. Again: L2 loads = L1D demand misses + L1D prefetches ๐ธL2_RQSTS.LOADS(Event 24H, Umask 03H)โ counts all L2 load requests โ L1D demand misses plus L1D prefetches, the whole guest list ๐L2_RQSTS.RFO_HIT(Event 24H, Umask 04H)โ counts store RFO requests that hit the L2 cache. L2 RFO requests include both L1D demand RFO misses and L1D RFO prefetches. The count also includes WC memory requests, where the data isn't fetched but you still need permission to write the line ๐L2_RQSTS.RFO_MISS(Event 24H, Umask 08H)โ counts store RFO requests that miss the L2 cache. L2 RFO requests = L1D demand RFO misses + L1D RFO prefetches ๐ฆL2_RQSTS.RFOS(Event 24H, Umask 0CH)โ counts all L2 store RFO requests, same composition as above (L1D demand RFO misses + L1D RFO prefetches) โจL2_RQSTS.IFETCH_HIT(Event 24H, Umask 10H)โ counts instruction fetches that hit the L2 cache. L2 instruction fetches include both L1I demand misses and L1I instruction prefetches ๐L2_RQSTS.IFETCH_MISS(Event 24H, Umask 20H)โ counts instruction fetches that miss the L2 cache โ L1I demand misses + L1I instruction prefetches ๐คL2_RQSTS.IFETCHES(Event 24H, Umask 30H)โ counts all instruction fetches (L1I demand misses + L1I instruction prefetches, fr fr) ๐ฅL2_RQSTS.PREFETCH_HIT(Event 24H, Umask 40H)โ counts L2 prefetch hits, for both code and data ๐L2_RQSTS.PREFETCH_MISS(Event 24H, Umask 80H)โ counts L2 prefetch misses, again both code and data ๐ญL2_RQSTS.PREFETCHES(Event 24H, Umask C0H)โ counts all L2 prefetches, code and data together, the full set ๐L2_RQSTS.MISS(Event 24H, Umask AAH)โ counts all L2 misses, code and data ๐L2_RQSTS.REFERENCES(Event 24H, Umask FFH)โ counts all L2 requests, code and data, every last one ๐L2_DATA_RQSTS.DEMAND.I_STATE(Event 26H, Umask 01H)โ counts L2 data demand loads where the cache line being loaded is in the I (invalid) state, i.e. a cache miss ๐ L2 demand loads = both L1D demand misses and L1D prefetches.L2_DATA_RQSTS.DEMAND.S_STATE(Event 26H, Umask 02H)โ counts L2 data demand loads where the line is in the S (shared) state. L2 demand loads are both L1D demand misses and L1D prefetches ๐ซถL2_DATA_RQSTS.DEMAND.E_STATE(Event 26H, Umask 04H)โ counts L2 data demand loads where the line is in the E (exclusive) state. Same definition of L2 demand loads as always ๐L2_DATA_RQSTS.DEMAND.M_STATE(Event 26H, Umask 08H)โ counts L2 data demand loads where the line is in the M (modified) state. L2 demand loads = L1D demand misses + L1D prefetches ๐ธL2_DATA_RQSTS.DEMAND.MESI(Event 26H, Umask 0FH)โ counts all L2 data demand requests, which are both L1D demand misses and L1D prefetches โจL2_DATA_RQSTS.PREFETCH.I_STATE(Event 26H, Umask 10H)โ counts L2 prefetch data loads where the line is in the I (invalid) state, i.e. a cache miss ๐L2_DATA_RQSTS.PREFETCH.S_STATE(Event 26H, Umask 20H)โ counts L2 prefetch data loads where the line is in the S (shared) state. Fun fact: a prefetch RFO will miss on an S state line, while a prefetch read will hit on one ๐ฆL2_DATA_RQSTS.PREFETCH.E_STATE(Event 26H, Umask 40H)โ counts L2 prefetch data loads where the line is in the E (exclusive) state ๐ฅL2_DATA_RQSTS.PREFETCH.M_STATE(Event 26H, Umask 80H)โ counts L2 prefetch data loads where the line is in the M (modified) state ๐L2_DATA_RQSTS.PREFETCH.MESI(Event 26H, Umask F0H)โ counts all L2 prefetch requests ๐L2_DATA_RQSTS.ANY(Event 26H, Umask FFH)โ counts all L2 data requests, periodt โญL2_WRITE.RFO.I_STATE(Event 27H, Umask 01H)โ counts L2 demand store RFO requests where the line being loaded is in the I (invalid) state, i.e. a cache miss. The L1D prefetcher does not issue an RFO prefetch โ this is a demand RFO request ๐คL2_WRITE.RFO.S_STATE(Event 27H, Umask 02H)โ counts L2 store RFO requests where the line is in the S (shared) state. Again, no RFO prefetch from the L1D prefetcher; this is a demand RFO request ๐L2_WRITE.RFO.M_STATE(Event 27H, Umask 08H)โ counts L2 store RFO requests where the line is in the M (modified) state. Still no L1D RFO prefetch โ demand RFO request only ๐ซถL2_WRITE.RFO.HIT(Event 27H, Umask 0EH)โ counts L2 store RFO requests where the line is in either the S, E or M states. L1D prefetcher doesn't issue an RFO prefetch; this is a demand RFO request ๐ธL2_WRITE.RFO.MESI(Event 27H, Umask 0FH)โ counts all L2 store RFO requests. The L1D prefetcher does not issue a RFO prefetch โ this is a demand RFO request โจL2_WRITE.LOCK.I_STATE(Event 27H, Umask 10H)โ counts L2 demand lock RFO requests where the line is in the I (invalid) state, i.e. a cache miss ๐L2_WRITE.LOCK.S_STATE(Event 27H, Umask 20H)โ counts L2 lock RFO requests where the line is in the S (shared) state ๐ฆL2_WRITE.LOCK.E_STATE(Event 27H, Umask 40H)โ counts L2 demand lock RFO requests where the line is in the E (exclusive) state ๐ฅL2_WRITE.LOCK.M_STATE(Event 27H, Umask 80H)โ counts L2 demand lock RFO requests where the line is in the M (modified) state ๐L2_WRITE.LOCK.HIT(Event 27H, Umask E0H)โ counts L2 demand lock RFO requests where the line is in either the S, E, or M state ๐L2_WRITE.LOCK.MESIโ (Event 27H, Umask F0H) counts, like, all the L2 demand lock RFO requests. Every single one. ๐L1D_WB_L2.I_STATEโ (Event 28H, Umask 01H) counts how many L1 writebacks to the L2 happen where the cache line being written is in the I (invalid) state โ i.e. a cache miss. It's giving "nothing was there bestie". ๐ซฅL1D_WB_L2.S_STATEโ (Event 28H, Umask 02H) counts L1 writebacks to the L2 where the line being written is in the S state. โจL1D_WB_L2.E_STATEโ (Event 28H, Umask 04H) counts L1 writebacks to the L2 where the line being written is in the E (exclusive) state. ๐L1D_WB_L2.M_STATEโ (Event 28H, Umask 08H) counts L1 writebacks to the L2 where the line being written is in the M (modified) state. ๐ฅL1D_WB_L2.MESIโ (Event 28H, Umask 0FH) counts all L1 writebacks to the L2. No filter, no drama, just vibes. ๐L3_LAT_CACHE.REFERENCEโ (Event 2EH, Umask 02H) counts uncore Last Level Cache references. ๐ง Now listen โ because of cache hierarchy, cache sizes and other implementation-specific characteristics, comparing the value to estimate performance differences is not recommended. See Table A-1.L3_LAT_CACHE.MISSโ (Event 2EH, Umask 01H) counts uncore Last Level Cache misses. ๐ญ Same caveat bestie: because of cache hierarchy, cache sizes and other implementation-specific characteristics, comparing the value to estimate performance differences is not recommended. See Table A-1.CPU_CLK_UNHALTED.THREAD_Pโ (Event 3CH, Umask 00H) 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. see Table A-1CPU_CLK_UNHALTED.REF_Pโ (Event 3CH, Umask 01H) increments at the frequency of TSC when not halted. see Table A-1DTLB_MISSES.ANYโ (Event 49H, Umask 01H) counts the number of misses in the STLB which cause a page walk. ๐ถโโ๏ธDTLB_MISSES.WALK_COMPLETEDโ (Event 49H, Umask 02H) counts the number of misses in the STLB which resulted in a completed page walk. ate and finished. โDTLB_MISSES.WALK_CYCLESโ (Event 49H, Umask 04H) counts cycles of page walk due to misses in the STLB. โณDTLB_MISSES.STLB_HITโ (Event 49H, Umask 10H) counts the number of DTLB first level misses that hit in the second level TLB. ๐ฏ Real talk: this event is only relevant if the core contains multiple DTLB levels.DTLB_MISSES.LARGE_WALK_COMPLETEDโ (Event 49H, Umask 80H) counts the number of completed large page walks due to misses in the STLB. Big pages, big energy. ๐LOAD_HIT_PREโ (Event 4CH, Umask 01H) counts load operations sent to the L1 data cache while a previous SSE prefetch instruction to the same cache line has started prefetching but has not yet finished. So close and yet so far. ๐ฉL1D_PREFETCH.REQUESTSโ (Event 4EH, Umask 01H) counts the number of hardware prefetch requests dispatched out of the prefetch FIFO. ๐ฌL1D_PREFETCH.MISSโ (Event 4EH, Umask 02H) counts the number of hardware prefetch requests that miss the L1D. Okay so there are two prefetchers in the L1D: a streamer, which predicts lines sequentially after this one should be fetched, and the IP prefetcher that remembers access patterns for the current instruction. The streamer prefetcher stops on an L1D hit, while the IP prefetcher does not. Different strokes, honestly. ๐ฆL1D_PREFETCH.TRIGGERSโ (Event 4EH, Umask 04H) counts the number of prefetch requests triggered by the Finite State Machine and pushed into the prefetch FIFO. Some of the prefetch requests get dropped due to overwrites or competition between the IP index prefetcher and streamer prefetcher. The prefetch FIFO contains 4 entries. ๐ Four. That's it.EPT.WALK_CYCLESโ (Event 4FH, Umask 10H) counts Extended Page walk cycles. ๐L1D.REPLโ (Event 51H, Umask 01H) counts the number of lines brought into the L1 data cache. Counter 0, 1 only.L1D.M_REPLโ (Event 51H, Umask 02H) counts the number of modified lines brought into the L1 data cache. Counter 0, 1 only.L1D.M_EVICTโ (Event 51H, Umask 04H) counts the number of modified lines evicted from the L1 data cache due to replacement. Counter 0, 1 only. bye bestie ๐L1D.M_SNOOP_EVICTโ (Event 51H, Umask 08H) counts the number of modified lines evicted from the L1 data cache due to snoop HITM intervention. Counter 0, 1 onlyL1D_CACHE_PREFETCH_LOCK_FB_HITโ (Event 52H, Umask 01H) counts the number of cacheable load lock speculated instructions accepted into the fill buffer. ๐L1D_CACHE_LOCK_FB_HITโ (Event 53H, Umask 01H) counts the number of cacheable load lock speculated or retired instructions accepted into the fill buffer. ๐OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_DATAโ (Event 60H, Umask 01H) counts weighted cycles of offcore demand data read requests. Does not include L2 prefetch requests. Counter 0.OFFCORE_REQUESTS_OUTSTANDING.DEMAND.READ_CODEโ (Event 60H, Umask 02H) counts weighted cycles of offcore demand code read requests. Does not include L2 prefetch requests. Counter 0.OFFCORE_REQUESTS_OUTSTANDING.DEMAND.RFOโ (Event 60H, Umask 04H) counts weighted cycles of offcore demand RFO requests. Does not include L2 prefetch requests. Counter 0.OFFCORE_REQUESTS_OUTSTANDING.ANY.READโ (Event 60H, Umask 08H) counts weighted cycles of offcore read requests of any kind. Include L2 prefetch requests. Counter 0.CACHE_LOCK_CYCLES.L1D_L2โ (Event 63H, Umask 01H) cycle count during which the L1D and L2 are locked. A lock is asserted when there is a locked memory access, due to uncacheable memory, a locked operation that spans two cache lines, or a page walk from an uncacheable page table. Counter 0, 1 only.
๐จ Bestie, listen to me: L1D and L2 locks have a very high performance penalty and it is highly recommended to avoid such accesses. Like, do not do this. Periodt.
CACHE_LOCK_CYCLES.L1Dโ (Event 63H, Umask 02H) counts the number of cycles that cacheline in the L1 data cache unit is locked. Counter 0, 1 only. ๐IO_TRANSACTIONSโ (Event 6CH, Umask 01H) counts the number of completed I/O transactions. โL1I.HITSโ (Event 80H, Umask 01H) counts all instruction fetches that hit the L1 instruction cache. slay. โจL1I.MISSESโ (Event 80H, Umask 02H) counts all instruction fetches that miss the L1I cache. This includes instruction cache misses, streaming buffer misses, victim cache misses and uncacheable fetches. Important detail: an instruction fetch miss is counted only once and not once for every cycle it is outstanding. ๐L1I.READSโ (Event 80H, Umask 03H) counts all instruction fetches, including uncacheable fetches that bypass the L1I. ๐ธL1I.CYCLES_STALLEDโ (Event 80H, Umask 04H) cycle counts for which an instruction fetch stalls due to a L1I cache miss, ITLB miss or ITLB fault. stuck in traffic vibes. ๐ญLARGE_ITLB.HITโ (Event 82H, Umask 01H) counts number of large ITLB hits. ๐ITLB_MISSES.ANYโ (Event 85H, Umask 01H) counts the number of misses in all levels of the ITLB which causes a page walk. ๐ถITLB_MISSES.WALK_COMPLETEDโ (Event 85H, Umask 02H) counts number of misses in all levels of the ITLB which resulted in a completed page walk. ๐ITLB_MISSES.WALK_CYCLESโ (Event 85H, Umask 04H) counts ITLB miss page walk cycles. โฑ๏ธITLB_MISSES.LARGE_WALK_COMPLETEDโ (Event 85H, Umask 80H) counts number of completed large page walks due to misses in the STLB. ๐ILD_STALL.LCPโ (Event 87H, Umask 01H) cycles Instruction Length Decoder stalls due to length changing prefixes:66,67orREX.W(for EM64T) instructions which change the length of the decoded instruction. ๐ตโ๐ซILD_STALL.MRUโ (Event 87H, Umask 02H) Instruction Length Decoder stall cycles due to Brand Prediction Unit (PBU) Most Recently Used (MRU) bypass.ILD_STALL.IQ_FULLโ (Event 87H, Umask 04H) stall cycles due to a full instruction queue. no room, no entry, we're full. ๐ILD_STALL.REGENโ (Event 87H, Umask 08H) counts the number of regen stalls.ILD_STALL.ANYโ (Event 87H, Umask 0FH) counts any cycles the Instruction Length Decoder is stalled. all of them. every last one. ๐BR_INST_EXEC.CONDโ (Event 88H, Umask 01H) counts the number of conditional near branch instructions executed, but not necessarily retired.BR_INST_EXEC.DIRECTโ (Event 88H, Umask 02H) counts all unconditional near branch instructions excluding calls and indirect branches.BR_INST_EXEC.INDIRECT_NON_CALLโ (Event 88H, Umask 04H) counts the number of executed indirect near branch instructions that are not calls.BR_INST_EXEC.NON_CALLSโ (Event 88H, Umask 07H) counts all non-call near branch instructions executed, but not necessarily retired.BR_INST_EXEC.RETURN_NEARโ (Event 88H, Umask 08H) counts indirect near branches that have a return mnemonic. ๐BR_INST_EXEC.DIRECT_NEAR_CALLโ (Event 88H, Umask 10H) counts unconditional near call branch instructions, excluding non-call branch, executed.BR_INST_EXEC.INDIRECT_NEAR_CALLโ (Event 88H, Umask 20H) counts indirect near calls, including both register and memory indirect, executed. ๐BR_INST_EXEC.NEAR_CALLSโ (Event 88H, Umask 30H) counts all near call branches executed, but not necessarily retired.BR_INST_EXEC.TAKENโ (Event 88H, Umask 40H) counts taken near branches executed, but not necessarily retired. ๐ฏBR_INST_EXEC.ANYโ (Event 88H, Umask 7FH) counts all near executed branches (not necessarily retired). This includes only instructions and not micro-op branches.
๐ซถ Note from the manpage, not me: frequent branching is not necessarily a major performance issue. However frequent branch mispredictions may be a problem.
BR_MISP_EXEC.CONDโ (Event 89H, Umask 01H) counts the number of mispredicted conditional near branch instructions executed, but not necessarily retired. ๐BR_MISP_EXEC.DIRECTโ (Event 89H, Umask 02H) counts mispredicted macro unconditional near branch instructions, excluding calls and indirect branches (should always be 0). yes bestie, always. if it's not, something is deeply wrong. ๐ญBR_MISP_EXEC.INDIRECT_NON_CALLโ (Event89H, Umask04H) bestie this one counts the executed mispredicted indirect near branch instructions that are not calls ๐BR_MISP_EXEC.NON_CALLSโ (Event89H, Umask07H) counts mispredicted non-call near branches that got executed, but not necessarily retired (ngl "executed" โ "retired" and the manpage is very serious about this distinction ๐ญ)BR_MISP_EXEC.RETURN_NEARโ (Event89H, Umask08H) counts mispredicted indirect branches that have arearreturn mnemonic ๐BR_MISP_EXEC.DIRECT_NEAR_CALLโ (Event89H, Umask10H) counts mispredicted non-indirect near calls executed โ and the manpage literally says it (should always be 0) ๐ so if you're seeing anything here, that's a vibe check fail fr frBR_MISP_EXEC.INDIRECT_NEAR_CALLโ (Event89H, Umask20H) counts mispredicted indirect near calls executed, and it's inclusive like that โ both register and memory indirect ๐ซถBR_MISP_EXEC.NEAR_CALLSโ (Event89H, Umask30H) counts all mispredicted near call branches executed, but not necessarily retired โจBR_MISP_EXEC.TAKENโ (Event89H, Umask40H) counts executed mispredicted near branches that are taken, but not necessarily retired ๐BR_MISP_EXEC.ANYโ (Event89H, Umask7FH) counts the number of mispredicted near branch instructions that were executed, but not necessarily retired. The whole category, the main character ๐RESOURCE_STALLS.ANYโ (EventA2H, Umask01H) counts the number of Allocator resource related stalls. Includes register renaming buffer entries, memory buffer entries. In addition to resource related stalls, this event counts some other events. Includes stalls arising during branch misprediction recovery โ like if retirement of the mispredicted branch is delayed โ and stalls arising while store buffer is draining from synchronizing operations. It does not include stalls due to SuperQ (off core) queue full, too many cache misses, etc. ๐RESOURCE_STALLS.LOADโ (EventA2H, Umask02H) counts the cycles of stall due to lack of load buffer for load operation ๐ดRESOURCE_STALLS.RS_FULLโ (EventA2H, Umask04H) this event counts the number of cycles when the number of instructions in the pipeline waiting for execution reaches the limit the processor can handle. A high count of this event indicates that there are long latency operations in the pipe โ possibly load and store operations that miss the L2 cache, or instructions dependent upon instructions further down the pipeline that have yet to retire. When RS is full, new instructions can not enter the reservation station and start execution ๐ซRESOURCE_STALLS.STOREโ (EventA2H, Umask08H) counts the number of cycles that a resource related stall will occur due to the number of store instructions reaching the limit of the pipeline, (i.e. all store buffers are used). The stall ends when a store instruction commits its data to the cache or memory ๐ฆRESOURCE_STALLS.ROB_FULLโ (EventA2H, Umask10H) counts the cycles of stall due to re-order buffer full ๐งบRESOURCE_STALLS.FPCWโ (EventA2H, Umask20H) counts the number of cycles while execution was stalled due to writing the floating-point unit (FPU) control word ๐RESOURCE_STALLS.MXCSRโ (EventA2H, Umask40H) stalls due to the MXCSR register rename occurring to close to a previous MXCSR rename. The MXCSR provides control and status for the MMX registers โ๏ธRESOURCE_STALLS.OTHERโ (EventA2H, Umask80H) counts the number of cycles while execution was stalled due to other resource issues. The catch-all, the "it's giving miscellaneous" bin ๐MACRO_INSTS.FUSIONS_DECODEDโ (EventA6H, Umask01H) counts the number of instructions decoded that are macro-fused but not necessarily executed or retired ๐งฌ (fused but not fulfilled, we've all been there)BACLEAR_FORCE_IQโ (EventA7H, Umask01H) counts number of times a BACLEAR was forced by the Instruction Queue. The IQ is also responsible for providing conditional branch prediction direction based on a static scheme and dynamic data provided by the L2 Branch Prediction Unit. If the conditional branch target is not found in the Target Array and the IQ predicts that the branch is taken, then the IQ will force the Branch Address Calculator to issue a BACLEAR. Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline ๐ซง โ eight whole cycles, no cap, that's a lot of bubbleLSD.UOPSโ (EventA8H, Umask01H) counts the number of micro-ops delivered by loop stream detector. Usecmask=1andinvertto count cycles ๐ITLB_FLUSHโ (EventAEH, Umask01H) counts the number of ITLB flushes ๐ฝ (okay it's a translation lookaside buffer flush but the joke writes itself)OFFCORE_REQUESTS.DEMAND.READ_DATAโ (EventB0H, Umask01H) counts number of offcore demand data read requests. Does not count L2 prefetch requests ๐OFFCORE_REQUESTS.DEMAND.READ_CODEโ (EventB0H, Umask02H) counts number of offcore demand code read requests. Does not count L2 prefetch requests ๐OFFCORE_REQUESTS.DEMAND.RFOโ (EventB0H, Umask04H) counts number of offcore demand RFO requests. Does not count L2 prefetch requests ๐OFFCORE_REQUESTS.ANY.READโ (EventB0H, Umask08H) counts number of offcore read requests. Includes L2 prefetch requests this time bestie, plot twist โจOFFCORE_REQUESTS.ANY.RFOโ (Event80H, Umask10H) counts number of offcore RFO requests. Includes L2 prefetch requests. (yes the event is80Hhere, notB0Hโ write it exactly like that, don't come for me ๐)OFFCORE_REQUESTS.L1D_WRITEBACKโ (EventB0H, Umask40H) counts number of L1D writebacks to the uncore ๐OFFCORE_REQUESTS.ANYโ (EventB0H, Umask80H) counts all offcore requests. Every single one. The whole squad ๐ฏUOPS_EXECUTED.PORT0โ (EventB1H, Umask01H) counts number of Uops executed that were issued on port 0. Port 0 handles integer arithmetic, SIMD and FP add Uops ๐ชUOPS_EXECUTED.PORT1โ (EventB1H, Umask02H) counts number of Uops executed that were issued on port 1. Port 1 handles integer arithmetic, SIMD, integer shift, FP multiply and FP divide Uops ๐ขUOPS_EXECUTED.PORT2_COREโ (EventB1H, Umask04H) counts number of Uops executed that were issued on port 2. Port 2 handles the load Uops. This is a core count only and can not be collected per thread โ ๏ธUOPS_EXECUTED.PORT3_COREโ (EventB1H, Umask08H) counts number of Uops executed that were issued on port 3. Port 3 handles store Uops. This is a core count only and can not be collected per thread โ ๏ธUOPS_EXECUTED.PORT4_COREโ (EventB1H, Umask10H) counts number of Uops executed that where issued on port 4. Port 4 handles the value to be stored for the store Uops issued on port 3. This is a core count only and can not be collected per thread โ ๏ธUOPS_EXECUTED.CORE_ACTIVE_CYCLES_NO_PORT5โ (EventB1H, Umask1FH) counts number of cycles there are one or more uops being executed and were issued on ports 0-4. This is a core count only and can not be collected per thread โ ๏ธUOPS_EXECUTED.PORT5โ (EventB1H, Umask20H) counts number of Uops executed that where issued on port 5 ๐๏ธ (the forbidden port, the one the previous event excluded)UOPS_EXECUTED.CORE_ACTIVE_CYCLESโ (EventB1H, Umask3FH) counts number of cycles there are one or more uops being executed on any ports. This is a core count only and can not be collected per thread โ ๏ธUOPS_EXECUTED.PORT015โ (EventB1H, Umask40H) counts number of Uops executed that where issued on port 0, 1, or 5. Usecmask=1,invert=1to count stall cycles ๐UOPS_EXECUTED.PORT234โ (EventB1H, Umask80H) counts number of Uops executed that where issued on port 2, 3, or 4 โจOFFCORE_REQUESTS_SQ_FULLโ (EventB2H, Umask01H) counts number of cycles the SQ is full to handle off-core requests ๐คSNOOPQ_REQUESTS_OUTSTANDING.DATAโ (EventB3H, Umask01H) counts weighted cycles of snoopq requests for data. Counter 0 only. Usecmask=1to count cycles not empty ๐SNOOPQ_REQUESTS_OUTSTANDING.INVALIDATEโ (EventB3H, Umask02H) counts weighted cycles of snoopq invalidate requests. Counter 0 only. Usecmask=1to count cycles not empty ๐SNOOPQ_REQUESTS_OUTSTANDING.CODEโ (EventB3H, Umask04H) counts weighted cycles of snoopq requests for code. Counter 0 only. Usecmask=1to count cycles not empty ๐SNOOPQ_REQUESTS.CODEโ (EventB4H, Umask01H) counts the number of snoop code requests ๐จSNOOPQ_REQUESTS.DATAโ (EventB4H, Umask02H) counts the number of snoop data requests ๐จSNOOPQ_REQUESTS.INVALIDATEโ (EventB4H, Umask04H) counts the number of snoop invalidate requests ๐จOFF_CORE_RESPONSE_0โ (EventB7H, Umask01H) see Section 30.6.1.3, Off-core Response Performance Monitoring in the Processor Core. Requires programming MSR01A6H๐งSNOOP_RESPONSE.HITโ (EventB8H, Umask01H) counts HIT snoop response sent by this thread in response to a snoop request โSNOOP_RESPONSE.HITEโ (EventB8H, Umask02H) counts HIT E snoop response sent by this thread in response to a snoop request โSNOOP_RESPONSE.HITMโ (EventB8H, Umask04H) counts HIT M snoop response sent by this thread in response to a snoop request โOFF_CORE_RESPONSE_1โ (EventBBH, Umask01H) see Section 30.6.1.3, Off-core Response Performance Monitoring in the Processor Core. Use MSR01A7H๐งINST_RETIRED.ANY_Pโ (EventC0H, Umask01H) See Table A-1 Notes:INST_RETIRED.ANYis counted by a designated fixed counter.INST_RETIRED.ANY_Pis counted by a programmable counter and is an architectural performance event. Event is supported ifCPUID.A.EBX[1] = 0. Counting: Faulting executions ofGETSEC/VM entry/VM Exit/MWait will not count as retired instructions โ ๏ธINST_RETIRED.X87โ (EventC0H, Umask02H) counts the number of floating point computational operations retired โ floating point computational operations executed by the assist handler and sub-operations of complex floating point instructions like transcendental instructions ๐งฎINST_RETIRED.MMXโ (EventC0H, Umask04H) counts the number of retired: MMX instructions ๐ฎUOPS_RETIRED.ANYโ (EventC2H, Umask01H) counts the micro-ops that actually retired, bestie. The math: macro-fused = 1, micro-fused = 2, everything else = 1, and the max count is 8 per cycle. Most instructions are made of one or two micro-ops. Some get decoded into way longer sequences โ think repeat instructions, floating point transcendental instructions, and assists. Pro tip from the source: usecmask=1and invert to count active cycles or stalled cycles. ๐UOPS_RETIRED.RETIRE_SLOTSโ (EventC2H, Umask02H) counts the number of retirement slots used each cycle.UOPS_RETIRED.MACRO_FUSEDโ (EventC2H, Umask04H) counts the number of macro-fused uops retired.MACHINE_CLEARS.CYCLESโ (EventC3H, Umask01H) counts the cycles machine clear is asserted.MACHINE_CLEARS.MEM_ORDERโ (EventC3H, Umask02H) counts machine clears due to memory order conflicts. ๐ญMACHINE_CLEARS.SMCโ (EventC3H, Umask04H) counts the number of times a program writes to a code section. Self-modifying code causes a severe penalty in all Intel 64 and IA-32 processors โ and the modified cache line gets written back to the L2 and L3 caches. Not the vibe, honestly. ๐BR_INST_RETIRED.ANY_Pโ (EventC4H, Umask00H) See Table A-1.BR_INST_RETIRED.CONDITIONALโ (EventC4H, Umask01H) counts the number of conditional branch instructions retired.BR_INST_RETIRED.NEAR_CALLโ (EventC4H, Umask02H) counts the number of direct & indirect near unconditional calls retired.BR_INST_RETIRED.ALL_BRANCHESโ (EventC4H, Umask04H) counts the number of branch instructions retired.BR_MISP_RETIRED.ANY_Pโ (EventC5H, Umask00H) See Table A-1.BR_MISP_RETIRED.CONDITIONALโ (EventC5H, Umask01H) counts mispredicted conditional retired calls.BR_MISP_RETIRED.NEAR_CALLโ (EventC5H, Umask02H) counts mispredicted direct & indirect near unconditional retired calls.BR_MISP_RETIRED.ALL_BRANCHESโ (EventC5H, Umask04H) counts all mispredicted retired calls.SSEX_UOPS_RETIRED.PACKED_SINGLEโ (EventC7H, Umask01H) counts SIMD packed single-precision floating point Uops retired. โจSSEX_UOPS_RETIRED.SCALAR_SINGLEโ (EventC7H, Umask02H) counts SIMD scalar single-precision floating point Uops retired.SSEX_UOPS_RETIRED.PACKED_DOUBLEโ (EventC7H, Umask04H) counts SIMD packed double-precision floating point Uops retired.SSEX_UOPS_RETIRED.SCALAR_DOUBLEโ (EventC7H, Umask08H) counts SIMD scalar double-precision floating point Uops retired.SSEX_UOPS_RETIRED.VECTOR_INTEGERโ (EventC7H, Umask10H) counts 128-bit SIMD vector integer Uops retired.ITLB_MISS_RETIREDโ (EventC8H, Umask20H) counts the number of retired instructions that missed the ITLB when the instruction was fetched. ๐ฆMEM_LOAD_RETIRED.L1D_HITโ (EventCBH, Umask01H) counts the number of retired loads that hit the L1 data cache.MEM_LOAD_RETIRED.L2_HITโ (EventCBH, Umask02H) counts the number of retired loads that hit the L2 data cache.MEM_LOAD_RETIRED.L3_UNSHARED_HITโ (EventCBH, Umask04H) counts the number of retired loads that hit their own, unshared lines in the L3 cache.MEM_LOAD_RETIRED.OTHER_CORE_L2_HIT_HITMโ (EventCBH, Umask08H) counts the number of retired loads that hit in a sibling core's L2 (on die core). Since the L3 is inclusive of all cores on the package, this is an L3 hit โ and it counts both clean or modified hits.MEM_LOAD_RETIRED.L3_MISSโ (EventCBH, Umask10H) counts the number of retired loads that miss the L3 cache. The load was satisfied by a remote socket, local memory or an IOH.MEM_LOAD_RETIRED.HIT_LFBโ (EventCBH, Umask40H) counts the number of retired loads that miss the L1D and the address is located in an allocated line fill buffer and will soon be committed to cache. Basically it's counting secondary L1D misses. ๐ซถMEM_LOAD_RETIRED.DTLB_MISSโ (EventCBH, Umask80H) counts the number of retired loads that missed the DTLB. Heads up tho: the DTLB miss is not counted if the load operation causes a fault. This event counts loads from cacheable memory only. It also does not count loads by software prefetches. And it counts both primary and secondary misses to the TLB. ๐FP_MMX_TRANS.TO_FPโ (EventCCH, Umask01H) counts the first floating-point instruction following any MMX instruction. You can use this event to estimate the penalties for the transitions between floating-point and MMX technology states.FP_MMX_TRANS.TO_MMXโ (EventCCH, Umask02H) counts the first MMX instruction following a floating-point instruction. Same deal โ you can use this event to estimate the penalties for the transitions between floating-point and MMX technology states.FP_MMX_TRANS.ANYโ (EventCCH, Umask03H) counts all transitions from floating point to MMX instructions and from MMX instructions to floating point instructions. You can use this event to estimate the penalties for the transitions between floating-point and MMX technology states. Iconic triple threat honestly. ๐MACRO_INSTS.DECODEDโ (EventD0H, Umask01H) counts the number of instructions decoded (but not necessarily executed or retired). Decoded โ done, bestie.UOPS_DECODED.STALL_CYCLESโ (EventD1H, Umask01H) counts the cycles of decoder stalls.UOPS_DECODED.MSโ (EventD1H, Umask02H) counts the number of Uops decoded by the Microcode Sequencer, MS. The MS delivers uops when the instruction is more than 4 uops long or a microcode assist is occurring.UOPS_DECODED.ESP_FOLDINGโ (EventD1H, Umask04H) counts the number of stack pointer (ESP) instructions decoded:push,pop,call,ret, etc. ESP instructions do not generate a Uop to increment or decrement ESP. Instead, they update anESP_Offsetregister that keeps track of the delta to the current value of the ESP register. ๐งUOPS_DECODED.ESP_SYNCโ (EventD1H, Umask08H) counts the number of stack pointer (ESP) sync operations where an ESP instruction is corrected by adding the ESP offset register to the current value of the ESP register.RAT_STALLS.FLAGSโ (EventD2H, Umask01H) counts the number of cycles during which execution stalled due to several reasons, one of which is a partial flag register stall. A partial register stall may occur when two conditions are met: 1) an instruction modifies some, but not all, of the flags in the flag register and 2) the next instruction, which depends on flags, depends on flags that were not modified by this instruction. ๐ญRAT_STALLS.REGISTERSโ (EventD2H, Umask02H) this event counts the number of cycles instruction execution latency became longer than the defined latency because the instruction used a register that was partially written by previous instruction.RAT_STALLS.ROB_READ_PORTโ (EventD2H, Umask04H) counts the number of cycles when ROB read port stalls occurred, which did not allow new micro-ops to enter the out-of-order pipeline. Ngl this one's a little messy: at this stage in the pipeline, additional stalls may occur at the same cycle and prevent the stalled micro-ops from entering the pipe. In such a case, micro-ops retry entering the execution pipe in the next cycle and the ROB-read port stall is counted again.RAT_STALLS.SCOREBOARDโ (EventD2H, Umask08H) counts the cycles where we stall due to microarchitecturally required serialization. Microcode scoreboarding stalls.RAT_STALLS.ANYโ (EventD2H, Umask0FH) counts all Register Allocation Table stall cycles due to: cycles when ROB read port stalls occurred, which did not allow new micro-ops to enter the execution pipe; cycles when partial register stalls occurred; cycles when flag stalls occurred; cycles floating-point unit (FPU) status word stalls occurred. To count each of these conditions separately use the events:RAT_STALLS.ROB_READ_PORT,RAT_STALLS.PARTIAL,RAT_STALLS.FLAGS, andRAT_STALLS.FPSW. ๐ฅSEG_RENAME_STALLSโ (EventD4H, Umask01H) counts the number of stall cycles due to the lack of renaming resources for theES,DS,FS, andGSsegment registers. If a segment is renamed but not retired and a second update to the same segment occurs, a stall occurs in the front-end of the pipeline until the renamed segment retires.ES_REG_RENAMESโ (EventD5H, Umask01H) counts the number of times theESsegment register is renamed.UOP_UNFUSIONโ (EventDBH, Umask01H) counts unfusion events due to floating point exception to a fused uop. ๐BR_INST_DECODEDโ (EventE0H, Umask01H) counts the number of branch instructions decoded.BPU_MISSED_CALL_RETโ (EventE5H, Umask01H) counts the number of times the Branch Prediction Unit missed predicting a call or return branch. ๐BACLEAR.CLEARโ (EventE6H, Umask01H) counts the number of times the front end is resteered, mainly when the Branch Prediction Unit cannot provide a correct prediction and this is corrected by the Branch Address Calculator at the front end. This can occur if the code has many branches such that they cannot be consumed by the BPU. Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline. The effect on total execution time depends on the surrounding code.BACLEAR.BAD_TARGETโ (EventE6H, Umask02H) counts the number of Branch Address Calculator clears (BACLEAR) asserted due to conditional branch instructions in which there was a target hit but the direction was wrong. Each BACLEAR asserted by the BAC generates approximately an 8 cycle bubble in the instruction fetch pipeline. ๐ซBPU_CLEARS.EARLYโ (EventE8H, Umask01H) counts early (normal) Branch Prediction Unit clears: the BPU predicted a taken branch after incorrectly assuming that it was not taken. The BPU clear leads to a 2 cycle bubble in the Front End. ๐ธBPU_CLEARS.LATEโ (EventE8H, Umask02H) counts late Branch Prediction Unit clears caused by Most Recently Used conflicts. The PBU clear leads to a 3 cycle bubble in the Front End. ๐THREAD_ACTIVEโ (EventECH, Umask01H) counts the cycles threads are active. bestie is booked and busy โจL2_TRANSACTIONS.LOADโ (EventF0H, Umask01H) counts L2 load operations due to HW prefetch or demand loads.L2_TRANSACTIONS.RFOโ (EventF0H, Umask02H) counts L2 RFO operations due to HW prefetch or demand RFOs.L2_TRANSACTIONS.IFETCHโ (EventF0H, Umask04H) counts L2 instruction fetch operations due to HW prefetch or demand ifetch.L2_TRANSACTIONS.PREFETCHโ (EventF0H, Umask08H) counts L2 prefetch operations.L2_TRANSACTIONS.L1D_WBโ (EventF0H, Umask10H) counts L1D writeback operations to the L2.L2_TRANSACTIONS.FILLโ (EventF0H, Umask20H) counts L2 cache line fill operations due to load, RFO, L1D writeback or prefetch.L2_TRANSACTIONS.WBโ (EventF0H, Umask40H) counts L2 writeback operations to the L3.L2_TRANSACTIONS.ANYโ (EventF0H, Umask80H) counts all L2 cache operations. the whole eras tour, basically ๐คL2_LINES_IN.S_STATEโ (EventF1H, Umask02H) counts the number of cache lines allocated in the L2 cache in the S (shared) state.L2_LINES_IN.E_STATEโ (EventF1H, Umask04H) counts the number of cache lines allocated in the L2 cache in the E (exclusive) state.L2_LINES_IN.ANYโ (EventF1H, Umask07H) counts the number of cache lines allocated in the L2 cache.L2_LINES_OUT.DEMAND_CLEANโ (EventF2H, Umask01H) counts L2 clean cache lines evicted by a demand request.L2_LINES_OUT.DEMAND_DIRTYโ (EventF2H, Umask02H) counts L2 dirty (modified) cache lines evicted by a demand request. messy but make it fashion ๐L2_LINES_OUT.PREFETCH_CLEANโ (EventF2H, Umask04H) counts L2 clean cache line evicted by a prefetch request.L2_LINES_OUT.PREFETCH_DIRTYโ (EventF2H, Umask08H) counts L2 modified cache line evicted by a prefetch request.L2_LINES_OUT.ANYโ (EventF2H, Umask0FH) counts all L2 cache lines evicted for any reason.SQ_MISC.LRU_HINTSโ (EventF4H, Umask04H) counts number of Super Queue LRU hints sent to L3.SQ_MISC.SPLIT_LOCKโ (EventF4H, Umask10H) counts the number of SQ lock splits across a cache line.SQ_FULL_STALL_CYCLESโ (EventF6H, Umask01H) counts cycles the Super Queue is full. Neither of the threads on this core will be able to access the uncore. no thoughts, queue full ๐ญFP_ASSIST.ALLโ (EventF7H, Umask01H) counts the number of floating point operations executed that required micro-code assist intervention. Assists are required in the following cases: SSE instructions, (Denormal input when theDAZflag is off or Underflow result when theFTZflag is off): x87 instructions, (NaN or denormal are loaded to a register or used as input from memory, Division by 0 or Underflow output).FP_ASSIST.OUTPUTโ (EventF7H, Umask02H) counts number of floating point micro-code assist when the output value (destination register) is invalid.FP_ASSIST.INPUTโ (EventF7H, Umask04H) counts number of floating point micro-code assist when the input value (one of the source operands to an FP instruction) is invalid.SIMD_INT_64.PACKED_MPYโ (EventFDH, Umask01H) counts number of SID integer 64 bit packed multiply operations.SIMD_INT_64.PACKED_SHIFTโ (EventFDH, Umask02H) counts number of SID integer 64 bit packed shift operations.SIMD_INT_64.PACKโ (EventFDH, Umask04H) counts number of SID integer 64 bit pack operations.SIMD_INT_64.UNPACKโ (EventFDH, Umask08H) counts number of SID integer 64 bit unpack operations.SIMD_INT_64.PACKED_LOGICALโ (EventFDH, Umask10H) counts number of SID integer 64 bit logical operations.SIMD_INT_64.PACKED_ARITHโ (EventFDH, Umask20H) counts number of SID integer 64 bit arithmetic operations.SIMD_INT_64.SHUFFLE_MOVEโ (EventFDH, Umask40H) counts number of SID integer 64 bit shift or move operations.
๐ซถ SEE ALSO
like, go read these next, they're all in the group chat:
pmc(3), pmc.amd(3), pmc.atom(3), pmc.core(3), pmc.corei7(3), pmc.corei7uc(3), pmc.iaf(3), pmc.soft(3), pmc.tsc(3), pmc.ucf(3), pmc.westmereuc(3), pmc_cpuinfo(3), pmclog(3), hwpmc(4)
๐ธ HISTORY
okay so the pmc library first appeared in FreeBSD 6.0. vintage. iconic. it's giving elder millennial of libraries ๐
๐ AUTHORS
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. thank you king, we stan ๐ซกโจ
and that's the whole page, bestie โ no cap, you now know more about Westmere performance counters than most people know about themselves. go forth and profile responsibly ๐ฆ๐
this one's from the Debian edition, dated February 25, 2012 โ a little time capsule of a manpage, still slaying in the terminal to this day ๐
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2010 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