PMC.ATOMSILVERMONT(3)
๐ PMC.ATOMSILVERMONT(3) โ the manual page, but make it make sense
okay so bestie, this is pmc.atomsilvermont from the Library Functions Manual, and it's all about measurement events for Intel Atom Silvermont family CPUs. think of it as the group chat where your CPU finally tells you what it's been up to. it's a libpmc page, we're in section 3, and we are so ready. ๐ฆ
๐ธ NAME ๐ธ
pmc.atomsilvermont โ measurement events for Intel Atom Silvermont family CPUs. literally that's the whole vibe of the page. ๐
๐ LIBRARY ๐
Performance Counters Library (libpmc, -lpmc). that's the one you link against, no cap. ๐
โจ SYNOPSIS โจ
#include <pmc.h>
that's it. that's the whole synopsis. iconic behavior honestly. ๐
๐ DESCRIPTION ๐
so, Intel Atom Silvermont CPUs contain PMCs conforming to version 3 of the Intel performance measurement architecture. yes bestie, version 3. we love a numbered era.
these CPUs contain two classes of PMCs, and they are not the same thing:
PMC_CLASS_IAFโ fixed-function counters that count only one hardware event per counter. one counter, one job. simple. loyal. ๐ซถPMC_CLASS_IAPโ programmable counters that may be configured to count one of a defined set of hardware events. these are the main characters, lowkey. ๐
the number of PMCs available in each class and their widths need to be determined at run time by calling pmc_cpuinfo(3). do not guess, do not assume, do not try to be cute about it. run the function. fr fr. ๐ง
also, for the receipts: Intel Atom Silvermont PMCs are documented in โCombined Volumesโ, Intel 64 and IA-32 Intel(R) Architecture Software Developer's Manual, Order Number 325462-050US, Intel Corporation, February 2014. that's the source material, keep it in your bookmarks. ๐
๐ฅ ATOM SILVERMONT FIXED FUNCTION PMCS ๐ฅ
these PMCs and their supported events are documented in pmc.iaf(3). that's it, go read that one, this page isn't gonna hold your hand on the fixed-function side. ๐ซก
๐ ATOM SILVERMONT PROGRAMMABLE PMCS ๐
the programmable PMCs support the following capabilities โ and yes, some of them are a hard no, and we respect the honesty:
PMC_CAP_CASCADEโ No ๐PMC_CAP_EDGEโ Yes โจPMC_CAP_INTERRUPTโ Yes ๐PMC_CAP_INVERTโ Yes ๐PMC_CAP_READโ Yes ๐PMC_CAP_PRECISEโ No ๐ญPMC_CAP_SYSTEMโ Yes ๐ก๏ธPMC_CAP_TAGGINGโ No ๐PMC_CAP_THRESHOLDโ Yes ๐PMC_CAP_USERโ Yes ๐โโ๏ธPMC_CAP_WRITEโ Yes โ๏ธ
๐ฆ Event Qualifiers ๐ฆ
event specifiers for these PMCs support the following common qualifiers. read them, memorize them, sprinkle them like glitter:
anyโ count matching events seen on any logical processor in a package. ๐cmask=valueโ configure the PMC to increment only if the number of configured events measured in a cycle is greater than or equal tovalue.edgeโ configure the PMC to count the number of de-asserted to asserted transitions of the conditions expressed by the other qualifiers. if specified, the counter will increment only once whenever a condition becomes true, irrespective of the number of clocks during which the condition remains true. one and done. โก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. flip it and reverse it. ๐osโ configure the PMC to count events happening at processor privilege level 0. very kernel of it. ๐งusrโ configure the PMC to count events occurring at privilege levels 1, 2 or 3. userland girlies rise. ๐
if neither theosnor theusrqualifiers are specified, the default is to enable both. so like, you get both unless you pick. generous. ๐
๐ง core-specificity qualifier
events that require core-specificity to be specified use an additional qualifier core=core, where the argument core is one of:
allโ measure event conditions on all cores. every single one. ๐ฏthisโ measure event conditions on this core. just us. ๐ซถ
the default is this.
๐ agent qualifier
events that require an agent qualifier to be specified use an additional qualifier agent=agent, where the argument agent is one of:
thisโ measure events associated with this bus agent.anyโ measure events caused by any bus agent.
the default is this.
๐ธ hardware prefetch qualifier
events that require a hardware prefetch qualifier to be specified use an additional qualifier prefetch=prefetch, where the argument prefetch is one of:
bothโ include all prefetches. ๐คฒonlyโ only count hardware prefetches. ๐ฏexcludeโ exclude hardware prefetches. ๐ซ
the default is both.
๐ cache coherence qualifier
events that require a cache coherence qualifier to be specified use an additional qualifier cachestate=state, where the argument state 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. all four letters, all the time. alphabetically unbothered. ๐ค
๐ snoop response qualifier
events that require a snoop response qualifier to be specified use an additional qualifier snoopresponse=response, where the argument response comprises of 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.
โญ snoop type qualifier
events that require a snoop type qualifier use an additional qualifier snooptype=type, where the argument type comprises the one of the following keywords:
cmp2iโ measure CMP2I snoops.cmp2sโ measure CMP2S snoops.
the default is to measure both snoops. equality! we love her. โ๏ธ
๐ Event Specifiers (Programmable PMCs) ๐
Atom Silvermont programmable PMCs support the following events. buckle up bestie, this is the long part, and every single one matters:
REHABQ.LD_BLOCK_ST_FORWARDโ (Event 03H,Umask 01H) the number of retired loads that were prohibited from receiving forwarded data from the store because of address mismatch. rude, honestly. ๐ซREHABQ.LD_BLOCK_STD_NOTREADYโ (Event 03H,Umask 02H) the cases where a forward was technically possible, but did not occur because the store data was not available at the right time. so close, and yet. ๐ญREHABQ.ST_SPLITSโ (Event 03H,Umask 04H) the number of retire stores that experienced cache line boundary splits. ๐REHABQ.LD_SPLITSโ (Event 03H,Umask 08H) the number of retire loads that experienced cache line boundary splits. same energy, loads edition. ๐REHABQ.LOCKโ (Event 03H,Umask 10H) the number of retired memory operations with lock semantics. these are either implicit locked instructions such as theXCHGinstruction or instructions with an explicitLOCKprefix (0xF0). very โdon't touch my stuffโ of them. ๐REHABQ.STA_FULLโ (Event 03H,Umask 20H) the number of retired stores that are delayed because there is not a store address buffer available. no room at the inn. ๐ฎโ๐จREHABQ.ANY_LDโ (Event 03H,Umask 40H) the number of load uops reissued from Rehabq. โป๏ธREHABQ.ANY_STโ (Event 03H,Umask 80H) the number of store uops reissued from Rehabq. โป๏ธMEM_UOPS_RETIRED.L1_MISS_LOADSโ (Event 04H,Umask 01H) the number of load ops retired that miss in L1 Data cache. note that prefetch misses will not be counted. read that again. ๐MEM_UOPS_RETIRED.L2_HIT_LOADSโ (Event 04H,Umask 02H) the number of load micro-ops retired that hit L2. ๐ฏMEM_UOPS_RETIRED.L2_MISS_LOADSโ (Event 04H,Umask 04H) the number of load micro-ops retired that missed L2. ๐ฌMEM_UOPS_RETIRED.DTLB_MISS_LOADSโ (Event 04H,Umask 08H) the number of load ops retired that had DTLB miss. ๐บ๏ธMEM_UOPS_RETIRED.UTLB_MISSโ (Event 04H,Umask 10H) the number of load ops retired that had UTLB miss. ๐บ๏ธMEM_UOPS_RETIRED.HITMโ (Event 04H,Umask 20H) the number of load ops retired that got data from the other core or from the other module. sharing is caring but it's also a counter. ๐คMEM_UOPS_RETIRED.ALL_LOADSโ (Event 04H,Umask 40H) the number of load ops retired. all of them. ๐ฆMEM_UOP_RETIRED.ALL_STORESโ (Event 04H,Umask 80H) the number of store ops retired. (yes, that'sMEM_UOPwith noSโ copy it exactly, don't be a hero.) ๐ฆPAGE_WALKS.D_SIDE_CYCLESโ (Event 05H,Umask 01H) every cycle when a D-side (walks due to a load) page walk is in progress. page walk duration divided by number of page walks is the average duration of page-walks. the edge trigger bit must be cleared. set Edge to count the number of page walks. ๐ถPAGE_WALKS.I_SIDE_CYCLESโ (Event 05H,Umask 02H) every cycle when an I-side (walks due to an instruction fetch) page walk is in progress. page walk duration divided by number of page walks is the average duration of page-walks. ๐ถPAGE_WALKS.WALKSโ (Event 05H,Umask 03H) the number of times a data (D) page walk or an instruction (I) page walk is completed or started. since a page walk implies a TLB miss, the number of TLB misses can be counted by counting the number of pagewalks. iykyk. ๐งLONGEST_LAT_CACHE.MISSโ (Event 2EH,Umask 41H) the total number of L2 cache references and the number of L2 cache misses respectively. L3 is not supported in Silvermont microarchitecture. don't go looking for it. ๐ซLONGEST_LAT_CACHE.REFERENCEโ (Event 2EH,Umask 4FH) the number of requests originating from the core that references a cache line in the L2 cache. L3 is not supported in Silvermont microarchitecture. again: no L3. none. ๐ซL2_REJECT_XQ.ALLโ (Event 30H,Umask 00H) the number of demand and prefetch transactions that the L2 XQ rejects due to a full or near full condition which likely indicates back pressure from the IDI link. the XQ may reject transactions from the L2Q (non-cacheable requests), BBS (L2 misses) and WOB (L2 write-back victims). busy queue, no vibes. ๐ตCORE_REJECT_L2Q.ALLโ (Event 31H,Umask 00H) the number of demand and L1 prefetcher requests rejected by the L2Q due to a full or nearly full condition which likely indicates back pressure from L2Q. it also counts requests that would have gone directly to the XQ, but are rejected due to a full or nearly full condition, indicating back pressure from the IDI link. the L2Q may also reject transactions from a core to insure fairness between cores, or to delay a core's dirty eviction when the address conflicts incoming external snoops. (note that L2 prefetcher requests that are dropped are not counted by this event.) ๐ตCPU_CLK_UNHALTED.CORE_Pโ (Event 3CH,Umask 00H) the number of core cycles while the core is not in a halt state. the core enters the halt state when it is running theHLTinstruction. in mobile systems the core frequency may change from time to time. for this reason this event may have a changing ratio with regards to time. โฐCPU_CLK_UNHALTED.REF_Pโ (Event 3CH,Umask 01H) the number of reference cycles that the core is not in a halt state. the core enters the halt state when it is running theHLTinstruction. in mobile systems the core frequency may change from time. this event is not affected by core frequency changes but counts as if the core is running at the maximum frequency all the time. steady queen. ๐ICACHE.HITโ (Event 80H,Umask 01H) the number of instruction fetches from the instruction cache. โICACHE.MISSESโ (Event 80H,Umask 02H) the number of instruction fetches that miss the Instruction cache or produce memory requests. this includes uncacheable fetches. an instruction fetch miss is counted only once and not once for every cycle it is outstanding. thank god. ๐ฎโ๐จ
okay we're pausing right here bestie โ there's more coming in part 2, so don't go anywhere ๐โจ
ICACHE.ACCESSES(Event 80H, Umask 03H) โ the number of instruction fetches, uncacheable ones included, bestie ๐NIP_STALL.ICACHE_MISS(Event B6H, Umask 04H) โ how many cycles the NIP stalls because of an icache miss. It's a cumulative count of cycles the NIP stalled for all the icache misses, so yeah, it stacks up ๐ญOFFCORE_RESPONSE_0(Event B7H, Umask 01H) โ this one needsMSR_OFFCORE_RESP0to specify the request type and response ๐ซถOFFCORE_RESPONSE_1(Event B7H, Umask 02H) โ same vibes, but it needsMSR_OFFCORE_RESPto specify the request type and response โจINST_RETIRED.ANY_P(Event C0H, Umask 00H) โ the number of instructions that retire execution. For instructions made of multiple micro-ops, this counts the retirement of the last micro-op of the instruction. And lowkey it just keeps counting during hardware interrupts, traps, and inside interrupt handlers โ she does not pause ๐UOPS_RETIRED.MS(Event C2H, Umask 01H) โ the number of micro-ops retired that came supplied from MSROM ๐UOPS_RETIRED.ALL(Event C2H, Umask 10H) โ the number of micro-ops retired, periodt ๐MACHINE_CLEARS.SMC(Event C3H, Umask 01H) โ the number of times a program writes to a code section. Heads up: self-modifying code causes a severe penalty in all Intel architecture processors, so likeโฆ don't ๐ซฃMACHINE_CLEARS.MEMORY_ORDERING(Event C3H, Umask 02H) โ the number of times the pipeline got cleared because of memory ordering issues ๐MACHINE_CLEARS.FP_ASSIST(Event C3H, Umask 04H) โ the number of times the pipeline stalled because FP operations needed assists ๐MACHINE_CLEARS.ALL(Event C3H, Umask 08H) โ the number of times the pipeline stalled due to any causes at all โ SMC, MO, FP assist, the whole squad ๐ญBR_INST_RETIRED.ALL_BRANCHES(Event C4H, Umask 00H) โ the number of branch instructions retired โจBR_INST_RETIRED.JCC(Event C4H, Umask 7EH) โ the number of retired branch instructions that were conditional jumps ๐ฆBR_INST_RETIRED.FAR_BRANCH(Event C4H, Umask BFH) โ the number of far branch instructions retired ๐ธBR_INST_RETIRED.NON_RETURN_IND(Event C4H, Umask EBH) โ the number of retired branch instructions that were near indirect call or near indirect jmp ๐BR_INST_RETIRED.RETURN(Event C4H, Umask F7H) โ the number of nearRETbranch instructions retired ๐BR_INST_RETIRED.CALL(Event C4H, Umask F9H) โ the number of nearCALLbranch instructions retired ๐BR_INST_RETIRED.IND_CALL(Event C4H, Umask FBH) โ the number of near indirectCALLbranch instructions retired ๐ฅBR_INST_RETIRED.REL_CALL(Event C4H, Umask FDH) โ the number of near relativeCALLbranch instructions retired โญBR_INST_RETIRED.TAKEN_JCC(Event C4H, Umask FEH) โ the number of retired branch instructions that were conditional jumps predicted taken ๐งBR_MISP_RETIRED.ALL_BRANCHES(Event C5H, Umask 00H) โ the number of mispredicted branch instructions retired ๐BR_MISP_RETIRED.JCC(Event C5H, Umask 7EH) โ the number of retired mispredicted branch instructions that were conditional jumps ๐ญBR_MISP_RETIRED.FAR(Event C5H, Umask BFH) โ the number of mispredicted far branch instructions retired ๐BR_MISP_RETIRED.NON_RETURN_IND(Event C5H, Umask EBH) โ the number of retired mispredicted branch instructions that were near indirect call or near indirect jmp ๐BR_MISP_RETIRED.RETURN(Event C5H, Umask F7H) โ the number of mispredicted nearRETbranch instructions retired ๐ธBR_MISP_RETIRED.CALL(Event C5H, Umask F9H) โ the number of mispredicted nearCALLbranch instructions retired ๐ซถBR_MISP_RETIRED.IND_CALL(Event C5H, Umask FBH) โ the number of mispredicted near indirectCALLbranch instructions retired ๐BR_MISP_RETIRED.REL_CALL(Event C5H, Umask FDH) โ the number of mispredicted near relativeCALLbranch instructions retired โจBR_MISP_RETIRED.TAKEN_JCC(Event C5H, Umask FEH) โ the number of retired mispredicted branch instructions that were conditional jumps predicted taken ๐ฆNO_ALLOC_CYCLES.ROB_FULL(Event CAH, Umask 01H) โ the number of cycles when no uops get allocated and the ROB is full โ and by "full" we mean less than 2 entries available, no cap ๐NO_ALLOC_CYCLES.RAT_STALL(Event CAH, Umask 20H) โ the number of cycles when no uops are allocated and a RATstall is asserted ๐NO_ALLOC_CYCLES.ALL(Event CAH, Umask 3FH) โ the number of cycles when the front-end doesn't provide any instructions to be allocated, for literally any reason ๐NO_ALLOC_CYCLES.NOT_DELIVERED(Event CAH, Umask 50H) โ the number of cycles when the front-end doesn't provide any instructions to be allocated, but the back end isn't stalled ๐ฅRS_FULL_STALL.MEC(Event CBH, Umask 01H) โ the number of cycles the allocation pipe line stalled because the RS for the MEC cluster is full ๐ญRS_FULL_STALL.ALL(Event CBH, Umask 1FH) โ the number of cycles the allocation pipe line stalled because any one of the RS is full ๐CYCLES_DIV_BUSY.ANY(Event CDH, Umask 01H) โ the number of cycles the divider is busy โญBACLEARS.ALL(Event E6H, Umask 01H) โ the number of baclears for any type of branch ๐BACLEARS.RETURN(Event E6H, Umask 08H) โ the number of baclears for return branches ๐งBACLEARS.COND(Event E6H, Umask 10H) โ the number of baclears for conditional branches ๐MS_DECODED.MS_ENTRY(Event E7H, Umask 01H)) โ the number of times the MSROM starts a flow of UOPS โจ (yes, the original has that extra)โ we keep it exactly as-is, iykyk ๐ )
๐ธ SEE ALSO ๐ธ
pmc(3), pmc.amd(3), pmc.atom(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 ๐
๐ AUTHORS ๐
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. The support for the Atom Silvermont microarchitecture was written by Hiren Panchasara <hiren@FreeBSD.org>. Absolute icons, both of them ๐ซถ
and that's a wrap bestie โ this page is from Debian, dated April 6, 2017, and it's PMC.ATOMSILVERMONT(3). slay, go count those cycles ๐โจ
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2014 Hiren Panchasara <hiren@FreeBSD.org>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms