PMC.CORE(3)
โจ NAME โจ
Okay so PMC.CORE(3) is the manual page for pmc.core โ measurement events for Intel Core Solo and Core Duo family CPUs. That's the whole readme, bestie: these are the performance-measurement events for those CPUs, and yes, it's giving very specific hardware lore. ๐
๐ธ LIBRARY ๐ธ
Performance Counters Library (libpmc, -lpmc).
๐ฆ SYNOPSIS ๐ฆ
#include <pmc.h>
๐ DESCRIPTION ๐
Intel Core Solo and Core Duo CPUs contain PMCs conforming to version 1 of the Intel performance measurement architecture. No cap, that's the architecture era we're in. โจ
These PMCs are documented in โVolume 3: System Programming Guideโ, IA-32 Intelยฎ Architecture Software Developer's Manual, Order Number 253669-027US, Intel Corporation, July 2008. So if you need the official lore, that's where it lives. ๐
๐ PMC Features ๐
CPUs conforming to version 1 of the Intel performance measurement architecture contain two programmable PMCs of class PMC_CLASS_IAP. The PMCs are 40 bits width and offer the following capabilities โ here's the yes/no tea:
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. Periodt.
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 thecmaskqualifier is present, making the counter increment when the number of events per cycle is less than the value specified by thecmaskqualifier.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. Lowkey generous of it. ๐ซถ
Events that require core-specificity to be specified use an additional qualifier core=value, where argument value 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 to be specified use an additional qualifier agent=value, where argument value 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 to be specified use an additional qualifier prefetch=value, where argument value 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 to be specified use an additional qualifier cachestate=value, where argument value contains one or more of the following letters:
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.
๐ฆ Event Specifiers ๐ฆ
The following event names are case insensitive. Whitespace, hyphens and underscore characters in these names are ignored. Iconic, honestly. โจ
Core PMCs support the following events:
BAClearsโ (EventE6H, Umask00H) The number of BAClear conditions asserted.BTB_Missesโ (EventE2H, Umask00H) The number of branches for which the branch table buffer did not produce a prediction.Br_BAC_Missp_Execโ (Event8AH, Umask00H) The number of branch instructions executed that were mispredicted at the front end.Br_Bogusโ (EventE4H, Umask00H) The number of bogus branches.Br_Call_Execโ (Event92H, Umask00H) The number of CALL instructions executed.Br_Call_Missp_Execโ (Event93H, Umask00H) The number of CALL instructions executed that were mispredicted.Br_Cnd_Execโ (Event8BH, Umask00H) The number of conditional branch instructions executed.Br_Cnd_Missp_Execโ (Event8CH, Umask00H) The number of conditional branch instructions executed that were mispredicted.Br_Ind_Call_Execโ (Event94H, Umask00H) The number of indirect CALL instructions executed.Br_Ind_Execโ (Event8DH, Umask00H) The number of indirect branches executed.Br_Ind_Missp_Execโ (Event8EH, Umask00H) The number of indirect branch instructions executed that were mispredicted.Br_Inst_Execโ (Event88H, Umask00H) The number of branch instructions executed including speculative branches.Br_Instr_Decodedโ (EventE0H, Umask00H) The number of branch instructions decoded.Br_Instr_Retโ (EventC4H, Umask00H) (Alias "Branch Instruction Retired") The number of branch instructions retired. This is an architectural performance event.Br_MisPred_Retโ (EventC5H, Umask00H) (Alias "Branch Misses Retired") The number of mispredicted branch instructions retired. This is an architectural performance event.Br_MisPred_Taken_Retโ (EventCAH, Umask00H) The number of taken and mispredicted branches retired.Br_Missp_Execโ (Event89H, Umask00H) The number of branch instructions executed and mispredicted at execution including branches that were not predicted.Br_Ret_BAC_Missp_Execโ (Event91H, Umask00H) The number of return branch instructions that were mispredicted at the front end.Br_Ret_Execโ (Event8FH, Umask00H) The number of return branch instructions executed.Br_Ret_Missp_Execโ (Event90H, Umask00H) The number of return branch instructions executed that were mispredicted.Br_Taken_Retโ (EventC9H, Umask00H) The number of taken branches retired.Bus_BNR_Clocksโ (Event61H, Umask00H) The number of external bus cycles while BNR (bus not ready) was asserted.Bus_DRDY_Clocks [,agent=agent]โ (Event62H, Umask00H) The number of external bus cycles while DRDY was asserted.Bus_Data_Rcvโ (Event64H, Umask40H) The number of cycles during which the processor is busy receiving data.Bus_Locks_Clocks [,core=core]โ (Event63H) The number of external bus cycles while the bus lock signal was asserted.Bus_Not_In_Use [,core=core]โ (Event7DH) The number of cycles when there is no transaction from the core.Bus_Req_Outstanding [,agent=agent] [,core=core]โ (Event60H) The weighted cycles of cacheable bus data read requests from the data cache unit or hardware prefetcher.Bus_Snoop_Stallโ (Event7EH, Umask00H) The number bus cycles while a bus snoop is stalled.Bus_Snoops [,agent=agent] [,cachestate=mesi]โ (Event77H) The number of snoop responses to bus transactions.Bus_Trans_Any [,agent=agent]โ (Event70H) The number of completed bus transactions.Bus_Trans_Brd [,core=core]โ (Event65H) The number of read bus transactions.Bus_Trans_Burst [,agent=agent]โ (Event6EH) The number of completed burst transactions. Retried transactions may be counted more than once.Bus_Trans_Def [,core=core]โ (Event6DH) The number of completed deferred transactions.Bus_Trans_IO [,agent=agent] [,core=core]โ (Event6CH) The number of completed I/O transactions counting both reads and writes.Bus_Trans_Ifetch [,agent=agent] [,core=core]โ (Event68H) Completed instruction fetch transactions.Bus_Trans_Inval [,agent=agent] [,core=core]โ (Event69H) The number completed invalidate transactions.Bus_Trans_Mem [,agent=agent]โ (Event6FH) The number of completed memory transactions.Bus_Trans_P [,agent=agent] [,core=core]โ (Event6BH) The number of completed partial transactions.Bus_Trans_Pwr [,agent=agent] [,core=core]โ (Event6AH) The number of completed partial write transactions.Bus_Trans_RFO [,agent=agent] [,core=core]โ (Event66H) The number of completed read-for-ownership transactions.Bus_Trans_WB [,agent=agent]โ (Event67H) The number of completed write-back transactions from the data cache unit, excluding L2 write-backs.Cycles_Div_Busyโ (Event14H, Umask00H) The number of cycles the divider is busy. The event is only available on PMC0.Cycles_Int_Maskedโ (EventC6H, Umask00H) The number of cycles while interrupts were disabled.Cycles_Int_Pending_Maskedโ (EventC7H, Umask00H) The number of cycles while interrupts were disabled and interrupts were pending.DCU_Snoop_To_Share [,core=core]โ (Event78H) The number of data cache unit snoops to L1 cache lines in the shared state.DCache_Cache_Lock [,cachestate=mesi]โ (Event42H) The number of cacheable locked read operations to invalid state.DCache_Cache_LD [,cachestate=mesi]โ (Event40H) The number of cacheable L1 data read operations.DCache_Cache_ST [,cachestate=mesi]โ (Event41H) The number cacheable L1 data write operations.DCache_M_Evictโ (Event47H, Umask00H) The number of M state data cache lines that were evicted.DCache_M_Replโ (Event46H, Umask00H) The number of M state data cache lines that were allocated.DCache_Pend_Missโ (Event48H, Umask00H) The weighted cycles an L1 miss was outstanding.DCache_Replโ (Event45H, Umask0FH) The number of data cache line replacements.Data_Mem_Cache_Refโ (Event44H, Umask02H) The number of cacheable read and write operations to L1 data cache.Data_Mem_Refโ (Event43H, Umask01H) The number of L1 data reads and writes, both cacheable and un-cacheable.Dbus_Busy [,core=core]โ (Event22H) The number of core cycles during which the data bus was busy.Dbus_Busy_Rd [,core=core]โ (Event23H) The number of cycles during which the data bus was busy transferring data to a core.Divโ (Event13H, Umask00H) the number of divide operations, including speculative ones, for both integer and floating point divides. Heads up: this one can only be counted on PMC1 ๐Dtlb_Missโ (Event49H, Umask00H) the number of data references that missed the TLB. gone, not found, R.I.P. ๐ญESP_Uopsโ (EventD7H, Umask00H) the number of ESP folding instructions decoded.EST_Trans [,trans=transition]โ (Event3AH) counts the number of Intel Enhanced SpeedStep transitions โจ. Thattransitionarg can be one of these:anyโ (Umask00H) count all the transitions.frequencyโ (Umask01H) count frequency transitions.
The default is any.
FP_Assistโ (Event11H, Umask00H) the number of floating point operations that required microcode assists. ngl this event is only available on PMC1.FP_Comp_Instr_Retโ (EventC1H, Umask00H) the number of X87 floating point compute instructions retired. only available on PMC0, bestie.FP_Comps_Op_Exeโ (Event10H, Umask00H) the number of floating point computational instructions executed.FP_MMX_Transโ (EventCCH, Umask01H) the number of transitions from X87 to MMX. the plot twist nobody asked for ๐ฆFused_Ld_Uops_Retโ (EventDAH, Umask01H) the number of fused load uops retired.Fused_St_Uops_Retโ (EventDAH, Umask02H) the number of fused store uops retired.Fused_Uops_Retโ (EventDAH, Umask00H) the number of fused uops retired. that's it, that's the whole vibe.HW_Int_Rxโ (EventC8H, Umask00H) the number of hardware interrupts received. incoming ๐ฉICache_Missesโ (Event81H, Umask00H) the number of instruction fetch misses in the instruction cache and streaming buffers.ICache_Readsโ (Event80H, Umask00H) the number of instruction fetches from the instruction cache and streaming buffers, counting both cacheable and un-cacheable fetches ๐IFU_Mem_Stallโ (Event86H, Umask00H) the number of cycles the instruction fetch unit was stalled while waiting for data from memory. same energy as buffering, honestly ๐ILD_Stallโ (Event87H, Umask00H) the number of instruction length decoder stalls.ITLB_Missesโ (Event85H, Umask00H) the number of instruction TLB misses.Instr_Decodedโ (EventD0H, Umask00H) the number of instructions decoded.Instr_Retโ (EventC0H, Umask00H) (Alias"Instruction Retired") the number of instructions retired. this is an architectural performance event โญL1_Pref_Reqโ (Event4FH, Umask00H) the number of L1 prefetch requests due to data cache misses.L2_ADS [,core=core]โ (Event21H) the number of L2 address strobes.L2_IFetch [,cachestate=mesi] [,core=core]โ (Event28H) the number of instruction fetches by the instruction fetch unit from L2 cache, including speculative fetches ๐L2_LD [,cachestate=mesi] [,core=core]โ (Event29H) the number of L2 cache reads.L2_Lines_In [,core=core] [,prefetch=prefetch]โ (Event24H) the number of L2 cache lines allocated.L2_Lines_Out [,core=core] [,prefetch=prefetch]โ (Event26H) the number of L2 cache lines evicted. bye bestie ๐L2_M_Lines_In [,core=core]โ (Event25H) the number of L2 M state cache lines allocated.L2_M_Lines_Out [,core=core] [,prefetch=prefetch]โ (Event27H) the number of L2 M state cache lines evicted.L2_No_Request_Cycles [,cachestate=mesi] [,core=core] [,prefetch=prefetch]โ (Event32H) the number of cycles there was no request to access L2 cache. tumbleweed era ๐ธL2_Reject_Cycles [,cachestate=mesi] [,core=core] [,prefetch=prefetch]โ (Event30H) the number of cycles the L2 cache was busy and rejecting new requests. not me, not today ๐L2_Rqsts [,cachestate=mesi] [,core=core] [,prefetch=prefetch]โ (Event2EH) the number of L2 cache requests.L2_ST [,cachestate=mesi] [,core=core]โ (Event2AH) the number of L2 cache writes, including speculative writes ๐LD_Blocksโ (Event03H, Umask00H) the number of load operations delayed due to store buffer blocks.LLC_Missesโ (Event2EH, Umask41H) the number of cache misses for references to the last level cache, excluding misses due to hardware prefetches. this is an architectural performance event โญLLC_Referenceโ the number of references to the last level cache, excluding those due to hardware prefetches. this is an architectural performance event โญ (Event2EH, Umask4FH) โ yep, it really said it twice, and it is an architectural performance event ๐MMX_Assistโ (EventCDH, Umask00H) the number of EMMX instructions executed.MMX_FP_Transโ (EventCCH, Umask00H) the number of transitions from MMX to X87.MMX_Instr_Execโ (EventB0H, Umask00H) the number of MMX instructions executed, excludingMOVQandMOVDstores. they said what they said ๐MMX_Instr_Retโ (EventCEH, Umask00H) the number of MMX instructions retired.Misalign_Mem_Refโ (Event05H, Umask00H) the number of misaligned data memory references, counting loads and stores. chaos, but make it measurable ๐Mulโ (Event12H, Umask00H) the number of multiply operations, including speculative floating point and integer multiplies. available on PMC1 only.NonHlt_Ref_Cyclesโ (Event3CH, Umask01H) (Alias"Unhalted Reference Cycles") the number of non-halted bus cycles. this is an architectural performance event โญPref_Rqsts_Dnโ (EventF8H, Umask00H) the number of hardware prefetch requests issued in backward streams.Pref_Rqsts_Upโ (EventF0H, Umask00H) the number of hardware prefetch requests issued in forward streams.Resource_Stallโ (EventA2H, Umask00H) the number of cycles where there is a resource related stall.SD_Drainsโ (Event04H, Umask00H) the number of cycles while draining store buffers. it's giving plumbing ๐ซถSIMD_FP_DP_P_Retโ (EventD8H, Umask02H) the number of SSE/SSE2 packed double precision instructions retired.SIMD_FP_DP_P_Comp_Retโ (EventD9H, Umask02H) the number of SSE/SSE2 packed double precision compute instructions retired.SIMD_FP_DP_S_Retโ (EventD8H, Umask03H) the number of SSE/SSE2 scalar double precision instructions retired.SIMD_FP_DP_S_Comp_Retโ (EventD9H, Umask03H) the number of SSE/SSE2 scalar double precision compute instructions retired.SIMD_FP_SP_P_Comp_Retโ (EventD9H, Umask00H) the number of SSE/SSE2 packed single precision compute instructions retired.SIMD_FP_SP_Retโ (EventD8H, Umask00H) the number of SSE/SSE2 scalar single precision instructions retired, both packed and scalar. (yes, it says scalar and then also both packed and scalar โ copying the lore exactly, no cap ๐ง)SIMD_FP_SP_S_Retโ (EventD8H, Umask01H) the number of SSE/SSE2 scalar single precision instructions retired.SIMD_FP_SP_S_Comp_Retโ (EventD9H, Umask01H) the number of SSE/SSE2 single precision compute instructions retired.SIMD_Int_128_Retโ (EventD8H, Umask04H) the number of SSE2 128-bit integer instructions retired.SIMD_Int_Pari_Execโ (EventB3H, Umask20H) the number of SIMD integer packed arithmetic instructions executed.SIMD_Int_Pck_Execโ (EventB3H, Umask04H) the number of SIMD integer pack operations instructions executed.SIMD_Int_Plog_Execโ (EventB3H, Umask10H) the number of SIMD integer packed logical instructions executed.SIMD_Int_Pmul_Execโ (EventB3H, Umask01H) the number of SIMD integer packed multiply instructions executed.SIMD_Int_Psft_Execโ (EventB3H, Umask02H) the number of SIMD integer packed shift instructions executed.SIMD_Int_Sat_Execโ (EventB1H, Umask00H) the number of SIMD integer saturating instructions executed.SIMD_Int_Upck_Execโ (EventB3H, Umask08H) the number of SIMD integer unpack instructions executed.SMC_Detectedโ (EventC3H, Umask00H) the number of times self-modifying code was detected. plot twist: self-inflicted ๐ญSSE_NTStores_Missโ (Event4BH, Umask03H) the number of times an SSE streaming store instruction missed all caches.SSE_NTStores_Retโ (Event07H, Umask03H) the number of SSE streaming store instructions executed.SSE_PrefNta_Missโ (Event4BH, Umask00H) the number of timesPREFETCHNTAmissed all caches.SSE_PrefNta_Retโ (Event07H, Umask00H) the number ofPREFETCHNTAinstructions retired.SSE_PrefT1_Missโ (Event4BH, Umask01H) the number of timesPREFETCHT1missed all caches.SSE_PrefT1_Retโ (Event07H, Umask01H) the number ofPREFETCHT1instructions retired.SSE_PrefT2_Missโ (Event4BH, Umask02H) the number of timesPREFETCHNT2missed all caches.SSE_PrefT2_Retโ (Event07H, Umask02H) the number ofPREFETCHT2instructions retired.Seg_Reg_Loadsโ (Event06H, Umask00H) the number of segment register loads.Serial_Execution_Cyclesโ (Event3CH, Umask02H) the number of non-halted bus cycles of this code while the other core was halted. main character energy, the other core literally took a nap ๐Thermal_Tripโ (Event3BH, UmaskC0H) the duration in a thermal trip, based on the current core clock. it's getting hot in here ๐ฅUnfusionโ (EventDBH, Umask00H) the number of unfusion events. the breakup arc ๐Unhalted_Core_Cyclesโ (Event3CH, Umask00H) the number of core clock cycles when the clock signal on a specific core is not halted. this is an architectural performance event โญUops_Retโ (EventC2H, Umask00H) the number of micro-ops retired. go off, king ๐
๐ท๏ธ EVENT NAME ALIASES ๐ท๏ธ
so here's the mapping between the PMC-independent aliases supported by the Performance Counters Library (libpmc, -lpmc) and the underlying hardware events they actually point at. iykyk ๐
branchesโBr_Instr_Retbranch-mispredictsโBr_MisPred_Retdc-missesโ (unsupported)ic-missesโICache_MissesinstructionsโInstr_RetinterruptsโHW_Int_Rxunhalted-cyclesโ (unsupported)
fr fr:dc-missesandunhalted-cyclesare (unsupported) โ they're listed as aliases but there's no hardware event behind them, so don't come for me when they don't work ๐
๐ PROCESSOR ERRATA ๐
okay bestie, listen up โ these are the known problems that mess with performance measurement on these processors, and you need to know about them before you trust your counters. They're all written down in โIntelยฎ CoreTM Duo Processor and Intelยฎ CoreTM Solo Processor on 65 nm Processโ, Specification Update, Order Number 309222-017, Intel Corporation, July 2008 โ that's the receipts, go read it if you want the full tea ๐ต
AE19โ data prefetch performance monitoring events can only be enabled on a single core. one. uno. that's it. no cap.AE25โ performance monitoring counters that count external bus events may report straight-up incorrect values after processor power state transitions. so if your numbers look weird after a power state changeโฆ that's why ๐ญAE28โ performance monitoring events for retired floating point operations (C1H) may not be accurate. the floats are lying to you, apparently ๐AE29โ aDR3address match on aMOVD/MOVQ/MOVNTQmemory store instruction may incorrectly increment the performance monitoring count for saturating SIMD instructions retired (EventCFH). like, it just goes and bumps the wrong counter. rude.AE33โ hardware prefetch performance monitoring events may be counted inaccurately. lowkey a theme here.AE36โ theCPU_CLK_UNHALTEDperformance monitoring event (Event3CH) counts clocks when the processor is in theC1/C2processor power states. so not exactly the vibe you asked for โจAE39โ certain performance monitoring counters related to bus, L2 cache and power management are inaccurate. not all of them! just certain ones. iconic vagueness ๐AE51โ performance monitoring events for retired instructions (EventC0H) may not be accurate. bestie. the instruction count. ๐ญAE67โ performance monitoring eventFP_ASSISTmay not be accurate.AE78โ performance monitoring event for hardware prefetch requests (Event4EH) and hardware prefetch request cache misses (Event4FH) may not be accurate.AE82โ performance monitoring eventFP_MMX_TRANS_TO_MMXmay not count some transitions. some! which ones? mystery. ๐ต๏ธโโ๏ธ
๐ SEE ALSO ๐
go off, read the whole friend group: pmc(3), pmc.amd(3), pmc.atom(3), pmc.core2(3), pmc.iaf(3), pmc.soft(3), pmc.tsc(3), pmclog(3), hwpmc(4)
๐ฐ๏ธ HISTORY ๐ฐ๏ธ
the pmc library first appeared in FreeBSD 6.0. a legend was born, fr fr โญ
๐ซถ AUTHORS ๐ซถ
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. thank you king, we appreciate you ๐
and that's the whole page bestie!! ๐ this one came from Debian, dated November 12, 2008, and it's PMC.CORE(3) โ go forth and count your counters responsibly, mwah ๐๐
๐ฆ 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