PMC.ATOM(3)
๐ฆ pmc.atom โ measurement events for Intel Atom family CPUs ๐ฆ
okay so this is the pmc.atom page from the Library Functions Manual โ it's all about measurement events for Intel Atom family CPUs, and bestie, we're gonna get through it together ๐
โจ LIBRARY โจ
Performance Counters Library (libpmc, -lpmc) โ yeah, that's the one, go link it ๐
โจ SYNOPSIS โจ
#include <pmc.h>
that's it. that's the whole include. iconic.
๐ธ DESCRIPTION ๐ธ
okay so picture this: Intel Atom CPUs ship with PMCs (performance monitoring counters, keep up ๐ ) that conform to version 3 of the Intel performance measurement architecture. And these CPUs contain two classes of PMCs:
PMC_CLASS_IAFโ fixed-function counters, and the way they work is they count only one hardware event per counter. one event, one counter, no choices, no drama ๐PMC_CLASS_IAPโ programmable counters, which are the flexible ones: you can configure them to count one of a defined set of hardware events. slay.
now, the number of PMCs available in each class and their widths? those are not a vibe you can just assume โ you have to determine them at run time by calling pmc_cpuinfo(3). don't skip that step fr fr ๐ฅ
Intel Atom PMCs are documented in โVolume 3: System Programming Guideโ, IA-32 Intel(R) Architecture Software Developer's Manual, Order Number 253669-027US, Intel Corporation, July 2008. go read the source, it's giving primary source energy ๐
๐ ATOM FIXED FUNCTION PMCS ๐
These PMCs and their supported events are documented in pmc.iaf(3). that's it, that's the whole subsection, go look there ๐ซถ
๐ ATOM PROGRAMMABLE PMCS ๐
the programmable PMCs support the following capabilities, and I'm gonna list every single one because we don't skip:
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 ๐
so the event specifiers for these PMCs support the following common qualifiers โ think of these as the little add-ons you can sprinkle on your event, like accessories for your outfit ๐
anyโ count matching events seen on any logical processor in a package. go wherever the events are, no loyalty ๐ซ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 a little threshold gate, very picky, we respect it.edgeโ configure the PMC to count the number of de-asserted โ asserted transitions of the conditions expressed by the other qualifiers. and if you specify it, 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, no double counting ๐invโ invert the sense of comparison when thecmaskqualifier is present, making the counter increment when the number of events per cycle is less than the value specified by thecmaskqualifier. it's the flip side, the plot twist ๐ญosโ configure the PMC to count events happening at processor privilege level 0. kernel business only ๐usrโ configure the PMC to count events occurring at privilege levels 1, 2 or 3. user-space girlies represent ๐ซถ
If neither of theosorusrqualifiers are specified, the default is to enable both. so like, no gatekeeping by default, love that for us.
now some events need extra specificity, and they use extra qualifiers. here we go:
Events that require core-specificity use an additional qualifier core=core, where core is one of:
allโ measure event conditions on all cores ๐thisโ measure event conditions on this core ๐ซ
The default is this.
Events that require an agent qualifier use an additional qualifier agent=agent, where agent is one of:
thisโ measure events associated with this bus agent ๐anyโ measure events caused by any bus agent ๐๐๐
The default is this.
Events that require a hardware prefetch qualifier use an additional qualifier prefetch=prefetch, where prefetch is one of:
bothโ include all prefetches โจonlyโ only count hardware prefetches ๐ฏexcludeโ exclude hardware prefetches ๐
The default is both.
Events that require a cache coherence qualifier use an additional qualifier cachestate=state, where state contains one or more of the following letters (mix and match, it's a whole alphabet vibe):
eโ count cache lines in the exclusive state ๐iโ count cache lines in the invalid state ๐mโ count cache lines in the modified state ๐ฅsโ count cache lines in the shared state ๐ซถ
The default is eims.
Events that require a snoop response qualifier use an additional qualifier snoopresponse=response, where response comprises the following keywords separated by + signs:
cleanโ measure CLEAN responses ๐งผhitโ measure HIT responses ๐ฏhitmโ measure HITM responses ๐ฅ
The default is to measure all the above responses.
Events that require a snoop type qualifier use an additional qualifier snooptype=type, where type comprises one of the following keywords:
cmp2iโ measure CMP2I snoops ๐cmp2sโ measure CMP2S snoops ๐
The default is to measure both snoops.
๐ Event Specifiers (Programmable PMCs) ๐
Atom programmable PMCs support the following events โ and yes, we're doing all of them. buckle up bestie, this is the main character section ๐
BACLEARSโ (EventE6H, Umask01H) The number of times the front end is resteered. ๐BOGUS_BRโ (EventE4H, Umask00H) The number of byte sequences mistakenly detected as taken branch instructions. not a real branch, embarrassing ๐BR_BAC_MISSP_EXECโ (Event8AH, Umask00H) The number of branch instructions that were mispredicted when decoded. ๐ญBR_CALL_MISSP_EXECโ (Event93H, Umask00H) The number of mispredictedCALLinstructions that were executed. ๐๐BR_CALL_EXECโ (Event92H, Umask00H) The number ofCALLinstructions executed. ๐BR_CND_EXECโ (Event8BH, Umask00H) The number of conditional branches executed, but not necessarily retired. like, they showed up, doesn't mean they stayed โจBR_CND_MISSP_EXECโ (Event8CH, Umask00H) The number of mispredicted conditional branches executed. ๐ญBR_IND_CALL_EXECโ (Event94H, Umask00H) The number of indirectCALLinstructions executed. ๐๐BR_IND_EXECโ (Event8DH, Umask00H) The number of indirect branch instructions executed. ๐BR_IND_MISSP_EXECโ (Event8EH, Umask00H) The number of mispredicted indirect branch instructions executed. ๐๐ญBR_INST_DECODEDโ (EventE0H, Umask01H) The number of branch instructions decoded. ๐BR_INST_EXECโ (Event88H, Umask00H) The number of branches executed, but not necessarily retired. again โ executed โ retired, keep that distinction in your notes bestie ๐BR_INST_RETIRED.ANYโ (EventC4H, Umask00H) (Alias "Branch Instruction Retired") The number of branch instructions retired. This is an architectural performance event. very official, very canon ๐BR_INST_RETIRED.ANY1โ (EventC4H, Umask0FH) The number of branch instructions retired that were mispredicted. ๐ญBR_INST_RETIRED.MISPREDโ (EventC5H, Umask00H) (Alias "Branch Misses Retired") The number of mispredicted branch instructions retired. This is an architectural performance event. ๐BR_INST_RETIRED.MISPRED_NOT_TAKENโ (EventC4H, Umask02H) The number of not taken branch instructions retired that were mispredicted. ๐ญ๐BR_INST_RETIRED.MISPRED_TAKENโ (EventC4H, Umask08H) The number taken branch instructions retired that were mispredicted. ๐ญโBR_INST_RETIRED.PRED_NOT_TAKENโ (EventC4H, Umask01H) The number of not taken branch instructions retired that were correctly predicted. ๐ฏ๐BR_INST_RETIRED.PRED_TAKENโ (EventC4H, Umask04H) The number of taken branch instructions retired that were correctly predicted. ๐ฏโBR_INST_RETIRED.TAKENโ (EventC4H, Umask0CH) The number of taken branch instructions retired. โBR_MISSP_EXECโ (Event89H, Umask00H) The number of mispredicted branch instructions that were executed. ๐ญBR_RET_MISSP_EXECโ (Event90H, Umask00H) The number of mispredictedRETinstructions executed. โฉ๏ธ๐ญBR_RET_BAC_MISSP_EXECโ (Event91H, Umask00H) The number ofRETinstructions executed that were mispredicted at decode time. โฉ๏ธ๐๐ญBR_RET_EXECโ (Event8FH, Umask00H) The number ofRETinstructions executed. โฉ๏ธBR_TKN_BUBBLE_1โ (Event97H, Umask00H) The number of branch predicted taken with bubble 1. ๐ซงBR_TKN_BUBBLE_2โ (Event98H, Umask00H) The number of branch predicted taken with bubble 2. ๐ซง๐ซงBUSQ_EMPTY [,core=core]โ (Event7DH) The number of cycles during which the core did not have any pending transactions in the bus queue. empty queue, peaceful era ๐งBUS_BNR_DRV [,agent=agent]โ (Event61H) The number of Bus Not Ready signals asserted on the bus. This event is thread-independent. ๐BUS_DATA_RCV [,core=core]โ (Event64H) The number of bus cycles during which the processor is receiving data. This event is thread-independent. ๐๐ฅBUS_DRDY_CLOCKS [,agent=agent]โ (Event62H) The number of bus cycles during which the Data Ready signal is asserted on the bus. This event is thread-independent. ๐โฐBUS_HIT_DRV [,agent=agent]โ (Event7AH) The number of bus cycles during which the processor drives theHIT#pin. This event is thread-independent. ๐๐ฏBUS_HITM_DRV [,agent=agent]โ (Event7BH) The number of bus cycles during which the processor drives theHITM#pin. This event is thread-independent. ๐๐ฅBUS_IO_WAIT [,core=core]โ (Event7FH) The number of core cycles during which I/O requests wait in the bus queue. the waiting room energy ๐ชBUS_LOCK_CLOCKS [,agent=agent] [,core=core]โ (Event63H) The number of bus cycles during which theLOCKsignal was asserted on the bus. This event is thread independent. ๐BUS_REQUEST_OUTSTANDING [,agent=agent] [,core=core]โ (Event60H) The number of pending full cache line read transactions on the bus occurring in each cycle. This event is thread independent. ๐๐BUS_TRANS_P [,agent=agent] [,core=core]โ (Event6BH) The number of partial bus transactions. ๐BUS_TRANS_IFETCH [,agent=agent] [,core=core]โ (Event68H) The number of instruction fetch full cache line bus transactions. ๐๐BUS_TRANS_INVAL [,agent=agent] [,core=core]โ (Event69H) The number of invalidate bus transactions. ๐๐๏ธBUS_TRANS_PWR [,agent=agent] [,core=core]โ (Event6AH) The number of partial write bus transactions. ๐โ๏ธBUS_TRANS_DEF [,agent=agent] [,core=core]โ (Event6DH) The number of deferred bus transactions. ๐โณBUS_TRANS_BURST [,agent=agent] [,core=core]โ (Event6EH) The number of burst transactions. ๐๐ฅBUS_TRANS_MEM [,agent=agent] [,core=core]โ (Event6FH) The number of memory bus transactions. ๐๐งBUS_TRANS_ANY [,agent=agent] [,core=core]โ (Event70H) The number of bus transactions of any kind. ๐๐BUS_TRANS_BRD [,agent=agent] [,core=core]โ (Event65H) The number of burst read transactions. ๐๐BUS_TRANS_IO [,agent=agent] [,core=core]โ (Event6CH) The number of completed I/O bus transactions due toINandOUTinstructions. ๐๐ฅ๐คBUS_TRANS_RFO[,agent=agent] [,core=core]โ (Event66H) how many Read For Ownership bus transactions went down. bestie's cache is claiming a line for itself, iconic behavior ๐BUS_TRANS_WB[,agent=agent] [,core=core]โ (Event67H) the number of explicit write-back bus transactions, and the reason is dirty line evictions. the data was messy so it had to go ๐งนCMP_SNOOP[,core=core] [,snooptype=snoop]โ (Event78H) how many times the L1 data cache got snooped on by the other core in the same processor. imagine being watched like that, no privacy fr ๐ญCPU_CLK_UNHALTED.BUSโ (Event3CH, Umask01H) (Alias "Unhalted Reference Cycles") bus cycles where the core is not in the halt state. this one is an architectural performance event, so it's kind of a big deal ๐CPU_CLK_UNHALTED.CORE_Pโ (Event3CH, Umask00H) (Alias "Unhalted Core Cycles") core cycles while the core is not in a halt state. also an architectural performance event โจCPU_CLK_UNHALTED.NO_OTHERโ (Event3CH, Umask02H) bus cycles where the core stays unhalted and the other core is halted. one of them is working, the other one is literally asleep ๐CYCLES_DIV_BUSYโ (Event14H, Umask01H) cycles the divider is busy. divider era, we love to see it ๐CYCLES_INT_MASKED.CYCLES_INT_MASKEDโ (EventC6H, Umask01H) cycles during which interrupts are disabled. do not disturb mode, periodt ๐CYCLES_INT_MASKED.CYCLES_INT_PENDING_AND_MASKEDโ (EventC6H, Umask02H) cycles where there were pending interrupts while interrupts were disabled. they were queued up waiting and nobody answered the door ๐ญCYCLES_L1I_MEM_STALLEDโ (Event86H, Umask00H) cycles where an instruction fetch stalls. the fetch said "hold on" ๐ซถDATA_TLB_MISSES.DTLB_MISSโ (Event08H, Umask07H) the number of memory access that missed the Data TLB. not in the table bestie, awkward ๐DATA_TLB_MISSES.DTLB_MISS_LDโ (Event08H, Umask05H) the number of loads that missed the Data TLB.DATA_TLB_MISSES.DTLB_MISS_STโ (Event08H, Umask06H) the number of stores that missed the Data TLB.DATA_TLB_MISSES.UTLB_MISS_LDโ (Event08H, Umask09H) the number of loads that missed the UTLB.DELAYED_BYPASS.FPโ (Event19H, Umask00H) floating point operations that used data immediately after that data was generated by a non floating point execution unit. no waiting, zero patience, main character energy ๐ฅDELAYED_BYPASS.LOADโ (Event19H, Umask01H) the number of delayed bypass penalty cycles that a load operation incurred. penalties, in this economy ๐ญDELAYED_BYPASS.SIMDโ (Event19H, Umask02H) how many times SIMD operations use data immediately after the data was generated by a non-SIMD execution unit.DIVโ (Event13H, Umask00H) the number of divide operations executed. heads up: this event is only available on PMC1 ๐DIV.ARโ (Event13H, Umask81H) the number of divide operations retired. retired like a queen leaving the stage ๐DIV.Sโ (Event13H, Umask01H) the number of divide operations executed.DTLB_MISSES.ANYโ (Event08H, Umask01H) Data TLB misses, and yes that includes the misses that result from speculative accesses. we count the bold guesses too ๐DTLB_MISSES.L0_MISS_LDโ (Event08H, Umask04H) level 0 DTLB misses due to load operations.DTLB_MISSES.MISS_LDโ (Event08H, Umask02H) Data TLB misses due to load operations.DTLB_MISSES.MISS_STโ (Event08H, Umask08H) Data TLB misses due to store operations.EIST_TRANSโ (Event3AH, Umask00H) the number of Enhanced Intel SpeedStep Technology transitions. glow-up after glow-up ๐ESP.ADDITIONSโ (EventABH, Umask02H) the number of automatic additions to the%espregister. stack grows, we cheer ๐ธESP.SYNCHโ (EventABH, Umask01H) how many times the%espregister was explicitly used in an address expression after it's implicitly used by aPUSHorPOPinstruction. messy but valid ๐EXT_SNOOP[,agent=agent] [,snoopresponse=response]โ (Event77H) the number of snoop responses to bus transactions. replying to the group chat of hardware ๐ซถFP_ASSISTโ (Event11H, Umask01H) floating point operations executed that needed a microcode assist, and that includes speculatively executed instructions. asking the group chat for help mid-quest ๐ญFP_ASSIST.ARโ (Event11H, Umask81H) floating point operations retired that needed a microcode assist.FP_COMP_OPS_EXEโ (Event10H, Umask00H) the number of floating point computational micro-ops executed. available only on PMC0, iykyk ๐FP_MMX_TRANS_TO_FPโ (EventCCH, Umask02H) transitions from MMX instructions to floating point instructions. switching lanes, slay โจFP_MMX_TRANS_TO_MMXโ (EventCCH, Umask01H) transitions from floating point instructions to MMX instructions.HW_INT_RCVโ (EventC8H, Umask00H) the number of hardware interrupts received. notifications: on ๐ICACHE.ACCESSESโ (Event80H, Umask03H) the number of instruction fetches.ICACHE.MISSESโ (Event80H, Umask02H) instruction fetches that miss the instruction cache. not found bestie ๐IDLE_DURING_DIVโ (Event18H, Umask00H) cycles where the divider is busy and no other execution unit or load operation was in progress. this event is available only on PMC0 ๐ILD_STALLโ (Event87H, Umask00H) cycles the instruction length decoder stalled due to a length changing prefix. the prefix changed and the decoder was like "waitโ" ๐INST_QUEUE.FULLโ (Event83H, Umask02H) cycles during which the instruction queue is full. no vacancy, we're booked ๐INST_RETIRED.ANY_Pโ (EventC0H, Umask00H) (Alias "Instruction Retired") the number of instructions retired. this is an architectural performance event, so it's basically famous ๐INST_RETIRED.LOADSโ (EventC0H, Umask01H) retired instructions that contained a load operation.INST_RETIRED.OTHERโ (EventC0H, Umask04H) retired instructions that did not contain a load or a store operation. the "other" girlies get counted too ๐INST_RETIRED.STORESโ (EventC0H, Umask02H) retired instructions that contained a store operation.ITLB.FLUSHโ (Event82H, Umask04H) the number of ITLB flushes. flush it, it's giving fresh start ๐ฝโจITLB.LARGE_MISSโ (Event82H, Umask10H) instruction fetches from large pages that miss the ITLB.ITLB.MISSESโ (Event82H, Umask02H) instruction fetches from both large and small pages that miss the ITLB.ITLB.SMALL_MISSโ (Event82H, Umask02H) instruction fetches from small pages that miss the ITLB.ITLB_MISS_RETIREDโ (EventC9H, Umask00H) retired instructions that missed the ITLB when they were fetched. missed at fetch time, retired anyway. resilient ๐ชL1D_ALL_REFโ (Event43H, Umask01H) references to L1 data cache, counting loads and stores of to all memory types. (yes, that's verbatim how it reads, don't come for me ๐ญ)L1D_ALL_CACHE_REFโ (Event43H, Umask02H) data reads and writes to cacheable memory.L1D_CACHE_LOCK[,cachestate=state]โ (Event42H) the number of locked reads from cacheable memory. ๐L1D_CACHE_LOCK_DURATIONโ (Event42H, Umask10H) cycles during which any cache line is locked by any locking instruction. how long the lock is being held, no line cutting ๐ซถL1D_CACHE.LDโ (Event40H, Umask21H) data reads from cacheable memory.L1D_CACHE.STโ (Event41H, Umask22H) data writes to cacheable memory.L1D_M_EVICTโ (Event47H, Umask00H) modified cache lines evicted from L1 data cache. evicted, sorry bestie, the lease ended ๐ญL1D_M_REPLโ (Event46H, Umask00H) modified lines allocated in L1 data cache. new line just moved in ๐L1D_PEND_MISSโ (Event48H, Umask00H) the total number of outstanding L1 data cache misses at any clock. pending, pending, pendingโฆ ๐L1D_PREFETCH.REQUESTSโ (Event4EH, Umask10H) how many times L1 data cache requested to prefetch a data cache line. manifestation, but for cache ๐ฎL1D_REPLโ (Event45H, Umask0FH) the number of lines brought into L1 data cache.L1D_SPLIT.LOADSโ (Event49H, Umask01H) load operations that span two cache lines. two homes, both valid ๐L1D_SPLIT.STORESโ (Event49H, Umask02H) store operations that span two cache lines.L1I_MISSESโ (Event81H, Umask00H) the number of instruction fetch unit misses.L1I_READSโ (Event80H, Umask00H) the number of instruction fetches.L2_ADS[,core=core]โ (Event21H) cycles the L2 address bus is in use. address bus is booked and busy ๐L2_DBUS_BUSY_RD[,core=core]โ (Event23H) core cycles where the L2 data bus is busy transferring data to the core. data in transit, tracking says out for delivery ๐ฆL2_IFETCH[,cachestate=state] [,core=core]โ (Event28H) instruction cache line requests coming from the instruction fetch unit.L2_LD[,cachestate=state] [,core=core] [,prefetch=prefetch]โ (Event29H) L2 cache read requests from L1 cache and L2 prefetchers. a whole crowd asking for data ๐ซถL2_LINES_IN[,core=core] [,prefetch=prefetch]โ (Event24H) cache lines allocated in L2 cache.L2_LINES_OUT[,core=core] [,prefetch=prefetch]โ (Event26H) L2 cache lines evicted.L2_LOCK[,cachestate=state] [,core=core]โ (Event2BH) locked accesses to cache lines that miss L1 data cache. ๐L2_M_LINES_IN[,core=core]โ (Event25H) the number of L2 cache line modifications.L2_M_LINES_OUT[,core=core] [,prefetch=prefetch]โ (Event27H) modified lines evicted from L2 cache. dirty and now it's gone ๐L2_NO_REQ[,core=core]โ (Event32H) cycles where no L2 cache requests were pending from a core. silence. blessed silence. ๐๏ธL2_REJECT_BUSQ[,cachestate=state] [,core=core] [,prefetch=prefetch]โ (Event30H) L2 cache requests that were rejected. left on read ๐ญL2_RQSTS[,cachestate=state] [,core=core] [,prefetch=prefetch]โ (Event2EH) completed L2 cache requests.L2_RQSTS.SELF.DEMAND.I_STATEโ (Event2EH, Umask41H) (Alias "LLC Misses") completed L2 cache demand requests from this core that missed the L2 cache. this one's an architectural performance event, so yeah, it's kind of a celebrity ๐L2_RQSTS.SELF.DEMAND.MESIโ (Event2EH, Umask4FH) (Alias "LLC References") completed L2 cache demand requests from this core.L2_ST[,cachestate=state] [,core=core]โ (Event2AH) store operations that miss the L1 cache and request data from the L2 cache. went downstairs to ask for the data fr ๐ถโโ๏ธLOAD_BLOCK.L1Dโ (Event03H, Umask20H) how many loads got blocked by the L1 data cache, bestie. rude of it tbh.LOAD_BLOCK.OVERLAP_STOREโ (Event03H, Umask08H) the count of loads that partially overlap an earlier store, or that are aliased with a previous store.LOAD_BLOCK.STAโ (Event03H, Umask02H) loads blocked by preceding stores whose address hasn't even been calculated yet. the suspense ๐LOAD_BLOCK.STDโ (Event03H, Umask04H) loads blocked by preceding stores to the same address whose data value is not known. so close and yet so far ๐ญLOAD_BLOCK.UNTIL_RETIREโ (Event03H, Umask10H) how many load operations were blocked until retirement.LOAD_HIT_PREโ (Event4CH, Umask00H) loads that conflicted with an prefetch to the same cache line. yes that's the original phrasing, it's iconic, don't touch it ๐MACHINE_CLEARS.SMCโ (EventC3H, Umask01H) how many times a program writes to a code section.MACHINE_NUKES.MEM_ORDERโ (EventC3H, Umask04H) how many times the execution pipeline got restarted because of a memory ordering conflict or a memory disambiguation misprediction. machine nukes, literally ๐ธMACRO_INSTS.ALL_DECODEDโ (EventAAH, Umask03H) the number of instructions decoded.MACRO_INSTS.CISC_DECODEDโ (EventAAH, Umask02H) the number of complex instructions decoded.MEMORY_DISAMBIGUATION.RESETโ (Event09H, Umask01H) how many cycles memory disambiguation misprediction occurs during.MEMORY_DISAMBIGUATION.SUCCESSโ (Event09H, Umask02H) the load operations that were successfully disambiguated. slay โจMEM_LOAD_RETIRED.DTLB_MISSโ (EventCBH, Umask04H) retired load operations that missed the DTLB.MEM_LOAD_RETIRED.L2_MISSโ (EventCBH, Umask02H) retired load operations that miss L2 cache.MEM_LOAD_RETIRED.L2_HITโ (EventCBH, Umask01H) retired load operations that hit L2 cache.MEM_LOAD_RETIRED.L2_LINE_MISSโ (EventCBH, Umask08H) load operations that missed L2 cache and caused a bus request. double trouble ๐ญMULโ (Event12H, Umask00H) the number of multiply operations executed. โ ๏ธ heads up: this event is only available on PMC1.MUL.ARโ (Event12H, Umask81H) the number of multiply operations retired.MUL.Sโ (Event12H, Umask01H) the number of multiply operations executed.PAGE_WALKS.WALKSโ (Event0CH, Umask03H) page walks executed due to an ITLB or DTLB miss. going for a lil walk ๐ถโโ๏ธPAGE_WALKS.CYCLESโ (Event0CH, Umask03H) how many cycles got spent in a page walk caused by an ITLB or DTLB miss.PREF_RQSTS_DNโ (EventF8H, Umask00H) downward prefetches issued from the Data Prefetch Logic unit to L2 cache.PREF_RQSTS_UPโ (EventF0H, Umask00H) upward prefetches issued from the Data Prefetch Logic unit to L2 cache.PREFETCH.PREFETCHNTAโ (Event07H, Umask08H) the number ofPREFETCHNTAinstructions executed.PREFETCH.PREFETCHT0โ (Event07H, Umask01H) the number ofPREFETCHT0instructions executed.PREFETCH.SW_L2โ (Event07H, Umask06H) the number ofPREFETCHT1andPREFETCHT2instructions executed. two for one ๐ซถRAT_STALLS.ANYโ (EventD2H, Umask0FH) stall cycles caused by any ofRAT_STALLS.FLAGS,RAT_STALLS.FPSW,RAT_STALLS.PARTIALandRAT_STALLS.ROB_READ_PORT. the whole squad ๐RAT_STALLS.FLAGSโ (EventD2H, Umask04H) cycles execution stalled because of a flag register induced stall.RAT_STALLS.FPSWโ (EventD2H, Umask08H) how many times the floating point status word was written.RAT_STALLS.PARTIAL_CYCLESโ (EventD2H, Umask02H) extra cycles of instruction execution latency from using a register that was partially written by previous instructions. the way that costs you cyclesโฆ ๐RAT_STALLS.ROB_READ_PORTโ (EventD2H, Umask01H) cycles when ROB read port stalls occurred.RESOURCE_STALLS.ANYโ (EventDCH, Umask1FH) cycles during which any resource related stall happened.RESOURCE_STALLS.BR_MISS_CLEARโ (EventDCH, Umask10H) cycles stalled due to branch misprediction.RESOURCE_STALLS.FPCWโ (EventDCH, Umask08H) cycles stalled due to writing the floating point control word.RESOURCE_STALLS.LD_STโ (EventDCH, Umask04H) cycles during which the number of loads and stores in the pipeline exceeded their limits. too much going on fr frRESOURCE_STALLS.ROB_FULLโ (EventDCH, Umask01H) cycles when the reorder buffer was full.RESOURCE_STALLS.RS_FULLโ (EventDCH, Umask02H) cycles during which the RS was full.RS_UOPS_DISPATCHEDโ (EventA0H, Umask00H) the number of micro-ops dispatched for execution.RS_UOPS_DISPATCHED.PORT0โ (EventA1H, Umask01H) cycles micro-ops were dispatched for execution on port 0.RS_UOPS_DISPATCHED.PORT1โ (EventA1H, Umask02H) cycles micro-ops were dispatched for execution on port 1.RS_UOPS_DISPATCHED.PORT2โ (EventA1H, Umask04H) cycles micro-ops were dispatched for execution on port 2.RS_UOPS_DISPATCHED.PORT3โ (EventA1H, Umask08H) cycles micro-ops were dispatched for execution on port 3.RS_UOPS_DISPATCHED.PORT4โ (EventA1H, Umask10H) cycles micro-ops were dispatched for execution on port 4.RS_UOPS_DISPATCHED.PORT5โ (EventA1H, Umask20H) cycles micro-ops were dispatched for execution on port 5. five ports, five icons ๐ โจ๐๐ฆ๐ธSB_DRAIN_CYCLESโ (Event04H, Umask01H) cycles while the store buffer is draining.SEGMENT_REG_LOADS.ANYโ (Event06H, Umask00H) the number of segment register loads.SEG_REG_RENAMES.ANYโ (EventD5H, Umask0FH) how many times any segment register was renamed.SEG_REG_RENAMES.DSโ (EventD5H, Umask02H) how many times the%dsregister is renamed.SEG_REG_RENAMES.ESโ (EventD5H, Umask01H) how many times the%esregister is renamed.SEG_REG_RENAMES.FSโ (EventD5H, Umask04H) how many times the%fsregister is renamed.SEG_REG_RENAMES.GSโ (EventD5H, Umask08H) how many times the%gsregister is renamed.SEG_RENAME_STALLS.ANYโ (EventD4H, Umask0FH) stalls due to lack of resource to rename any segment register.SEG_RENAME_STALLS.DSโ (EventD4H, Umask02H) stalls due to lack of renaming resources for the%dsregister.SEG_RENAME_STALLS.ESโ (EventD4H, Umask01H) stalls due to lack of renaming resources for the%esregister.SEG_RENAME_STALLS.FSโ (EventD4H, Umask04H) stalls due to lack of renaming resources for the%fsregister.SEG_RENAME_STALLS.GSโ (EventD4H, Umask08H) stalls due to lack of renaming resources for the%gsregister.SIMD_ASSISTโ (EventCDH, Umask00H) the number of SIMD assists invoked.SIMD_COMP_INST_RETIRED.PACKED_DOUBLEโ (EventCAH, Umask04H) then number of computational SSE2 packed double precision instructions retired. (yes, "then" โ the original said it, we're keeping it, it's part of the lore ๐)SIMD_COMP_INST_RETIRED.PACKED_SINGLEโ (EventCAH, Umask01H) then number of computational SSE2 packed single precision instructions retired.SIMD_COMP_INST_RETIRED.SCALAR_DOUBLEโ (EventCAH, Umask08H) then number of computational SSE2 scalar double precision instructions retired.SIMD_COMP_INST_RETIRED.SCALAR_SINGLEโ (EventCAH, Umask02H) then number of computational SSE2 scalar single precision instructions retired.SIMD_INSTR_RETIREDโ (EventCEH, Umask00H) retired SIMD instructions that use MMX registers. throwback ๐SIMD_INST_RETIRED.ANYโ (EventC7H, Umask1FH) the number of streaming SIMD instructions retired.SIMD_INST_RETIRED.PACKED_DOUBLEโ (EventC7H, Umask04H) SSE2 packed double precision instructions retired.SIMD_INST_RETIRED.PACKED_SINGLEโ (EventC7H, Umask01H) SSE packed single precision instructions retired.SIMD_INST_RETIRED.SCALAR_DOUBLEโ (EventC7H, Umask08H) SSE2 scalar double precision instructions retired.SIMD_INST_RETIRED.SCALAR_SINGLEโ (EventC7H, Umask02H) SSE scalar single precision instructions retired.SIMD_INST_RETIRED.VECTORโ (EventC7H, Umask10H) SSE2 vector instructions retired.SIMD_SAT_INSTR_RETIREDโ (EventCFH, Umask00H) saturated arithmetic SIMD instructions retired.SIMD_SAT_UOP_EXEC.ARโ (EventB1H, Umask80H) SIMD saturated arithmetic micro-ops retired.SIMD_SAT_UOP_EXEC.Sโ (EventB1H, Umask00H) SIMD saturated arithmetic micro-ops executed.SIMD_UOPS_EXEC.ARโ (EventB0H, Umask80H) the number of SIMD micro-ops retired.SIMD_UOPS_EXEC.Sโ (EventB0H, Umask00H) the number of SIMD micro-ops executed.SIMD_UOP_TYPE_EXEC.ARITHMETIC.ARโ (EventB3H, UmaskA0H) SIMD packed arithmetic micro-ops executed.SIMD_UOP_TYPE_EXEC.ARITHMETIC.Sโ (EventB3H, Umask20H) SIMD packed arithmetic micro-ops executed.SIMD_UOP_TYPE_EXEC.LOGICAL.ARโ (EventB3H, Umask90H) SIMD packed logical micro-ops executed.SIMD_UOP_TYPE_EXEC.LOGICAL.Sโ (EventB3H, Umask10H) SIMD packed logical micro-ops executed.SIMD_UOP_TYPE_EXEC.MUL.ARโ (EventB3H, Umask81H) SIMD packed multiply micro-ops retired.SIMD_UOP_TYPE_EXEC.MUL.Sโ (EventB3H, Umask01H) SIMD packed multiply micro-ops executed.SIMD_UOP_TYPE_EXEC.PACK.ARโ (EventB3H, Umask84H) the number of SIMD pack micro-ops retired.SIMD_UOP_TYPE_EXEC.PACK.Sโ (EventB3H, Umask04H) how many SIMD pack micro-ops got executed ๐SIMD_UOP_TYPE_EXEC.SHIFT.ARโ (EventB3H, Umask82H) the count of SIMD packed shift micro-ops that retired โจSIMD_UOP_TYPE_EXEC.SHIFT.Sโ (EventB3H, Umask02H) how many SIMD packed shift micro-ops were executed ๐SIMD_UOP_TYPE_EXEC.UNPACK.ARโ (EventB3H, Umask88H) the number of SIMD unpack micro-ops executed ๐ธSIMD_UOP_TYPE_EXEC.UNPACK.Sโ (EventB3H, Umask08H) same vibe, unpack micro-ops executed, count 'em ๐ฆSNOOP_STALL_DRV[,agent=agent] [,core=core]โ (Event7EH) how many times the bus stalled waiting on snoops ๐ญ this one is thread-independent, so don't go attributing it to a thread, bestieSSE_PRE_EXEC.L2โ (Event07H, Umask02H) the number ofPREFETCHT1instructions executed ๐SSE_PRE_EXEC.STORESโ (Event07H, Umask03H) how many times SSE non-temporal store instructions were executed ๐ฅSSE_PRE_MISS.L1โ (Event4BH, Umask01H) how many timesPREFETCHT0executed and missed all cache levels ๐ brutalSSE_PRE_MISS.L2โ (Event4BH, Umask02H) how many timesPREFETCHT1executed and missed all cache levels ๐ฌSSE_PRE_MISS.NTAโ (Event4BH, Umask00H) how many timesPREFETCHNTAexecuted and missed all cache levels ๐STORE_BLOCK.ORDERโ (Event04H, Umask02H) the number of cycles spent while a store was waiting for another store to be globally observed โณSTORE_BLOCK.SNOOPโ (Event04H, Umask08H) the number of cycles while a store was blocked because of a conflict with an internal or external snoop ๐งSTORE_FORWARDS.GOODโ (Event02H, Umask81H) how many times stored data got forwarded directly to a load โ we love a shortcut ๐THERMAL_TRIPโ (Event3BH, UmaskC0H) the number of thermal trips ๐ก๏ธ she's hot, literallyUOPS_RETIRED.LD_IND_BRโ (EventC2H, Umask01H) micro-ops retired that fused a load with another operation ๐งUOPS_RETIRED.STD_STAโ (EventC2H, Umask02H) store address calculations that fused into one micro-op โจUOPS_RETIRED.MACRO_FUSIONโ (EventC2H, Umask04H) how many times retired instruction pairs were fused into one micro-op ๐ซถ iconic behaviorUOPS_RETIRED.FUSEDโ (EventC2H, Umask07H) the number of fused micro-ops retired ๐UOPS_RETIRED.NON_FUSEDโ (EventC2H, Umask8H) the number of non-fused micro-ops retired ๐UOPS_RETIRED.ANYโ (EventC2H, Umask10H) the number of micro-ops retired, periodt ๐X87_COMP_OPS_EXE.ANY.ARโ (Event10H, Umask81H) the number of x87 floating-point computational micro-ops retired ๐X87_COMP_OPS_EXE.ANY.Sโ (Event10H, Umask01H) the number of x87 floating-point computational micro-ops executed โญX87_OPS_RETIRED.ANYโ (EventC1H, UmaskFEH) the number of floating point computational instructions retired ๐ฅX87_OPS_RETIRED.FXCHโ (EventC1H, Umask01H) the number ofFXCHinstructions retired ๐
๐ท๏ธ Event Name Aliases
okay so this next part is lowkey the bestie-friendly cheat sheet ๐ซถ here's the mapping between the PMC-independent aliases that the Performance Counters Library (libpmc, -lpmc) supports and the actual hardware events underneath them on these CPUs:
branchesโBR_INST_RETIRED.ANYโPMC_CLASS_IAPbranch-mispredictsโBR_INST_RETIRED.MISPREDโPMC_CLASS_IAPic-missesโICACHE.MISSESโPMC_CLASS_IAPinstructionsโINST_RETIRED.ANY_PโPMC_CLASS_IAFinterruptsโHW_INT_RCVโPMC_CLASS_IAPunhalted-cyclesโCPU_CLK_UNHALTED.CORE_PโPMC_CLASS_IAF
๐ SEE ALSO
go read these next, fr fr:
pmc(3), pmc.amd(3), pmc.atomsilvermont(3), pmc.core(3), pmc.core2(3), pmc.iaf(3), pmc.soft(3), pmc.tsc(3), pmc_cpuinfo(3), pmclog(3), hwpmc(4)
๐ HISTORY
The pmc library first appeared in FreeBSD 6.0 โจ she's been around a minute, respect her
๐ AUTHORS
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org> ๐ ty king
and that's a wrap bestie ๐
this page was served up by Debian, dated March 20, 2014, and it lives at PMC.ATOM(3) โ go forth and count them counters ๐ฆโจ
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2008 Joseph Koshy. All rights reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms