PMC.CORE2(3)

๐Ÿ“ฆ
version 15.1 ยท 2 versions
, in freebsd 15.1

๐Ÿ’– pmc.core2 โ€” measurement events for Intel Core2 family CPUs ๐Ÿ’–

๐ŸŒธ NAME ๐ŸŒธ

pmc.core2 โ€” measurement events for Intel Core2 family CPUs, aka the manual page pmc.core2(3) bestie ๐Ÿ’…

๐Ÿ“š LIBRARY ๐Ÿ“š

Performance Counters Library (libpmc, -lpmc) ๐Ÿซถ

๐Ÿช„ SYNOPSIS ๐Ÿช„

okay so first you gotta pull in the header:

#include <pmc.h>

๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

Intel Core2 CPUs contain PMCs conforming to version 2 of the Intel performance measurement architecture. These CPUs may contain up to two 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 Core2 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 ๐Ÿ“–โœจ.

๐Ÿงš CORE2 FIXED FUNCTION PMCS ๐Ÿงš

These PMCs and their supported events are documented in pmc.iaf(3). Not all CPUs in this family implement fixed-function counters ๐Ÿซถ.

๐Ÿ”ฅ CORE2 PROGRAMMABLE PMCS ๐Ÿ”ฅ

The programmable PMCs support the following capabilities, fr fr:

  • 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:

  • 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 ๐Ÿซถ.

Events that require core-specificity to be specified use an additional qualifier core=core, where argument core is one of:

  • core=core โ€” pick your core vibe:
    • 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=agent, where argument agent is one of:

  • agent=agent โ€” choose your bus-agent energy:
    • 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=prefetch, where argument prefetch is one of:

  • prefetch=prefetch โ€” prefetch mode, bestie:
    • 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=state, where argument state contains one or more of the following letters:

  • cachestate=state โ€” cache-state letters, go off:
    • 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 to be specified use an additional qualifier snoopresponse=response, where argument response comprises of the following keywords separated by + signs:

  • snoopresponse=response โ€” snoop-response vibes:
    • 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 argument type comprises the one of the following keywords:

  • snooptype=type โ€” snoop-type moment:
    • cmp2i โ€” Measure CMP2I snoops.
    • cmp2s โ€” Measure CMP2S snoops.

The default is to measure both snoops ๐ŸŒŸ.

๐ŸŒŸ Event Specifiers (Programmable PMCs) ๐ŸŒŸ

Core2 programmable PMCs support the following events:

  • BACLEARS โ€” (Event E6H, Umask 00H) The number of times the front end is resteered.
  • BOGUS_BR โ€” (Event E4H, Umask 00H) The number of byte sequences mistakenly detected as taken branch instructions.
  • BR_BAC_MISSP_EXEC โ€” (Event 8AH, Umask 00H) The number of branch instructions that were mispredicted when decoded.
  • BR_CALL_MISSP_EXEC โ€” (Event 93H, Umask 00H) The number of mispredicted CALL instructions that were executed.
  • BR_CALL_EXEC โ€” (Event 92H, Umask 00H) The number of CALL instructions executed.
  • BR_CND_EXEC โ€” (Event 8BH, Umask 00H) The number of conditional branches executed, but not necessarily retired.
  • BR_CND_MISSP_EXEC โ€” (Event 8CH, Umask 00H) The number of mispredicted conditional branches executed.
  • BR_IND_CALL_EXEC โ€” (Event 94H, Umask 00H) The number of indirect CALL instructions executed.
  • BR_IND_EXEC โ€” (Event 8DH, Umask 00H) The number of indirect branch instructions executed.
  • BR_IND_MISSP_EXEC โ€” (Event 8EH, Umask 00H) The number of mispredicted indirect branch instructions executed.
  • BR_INST_DECODED โ€” (Event E0H, Umask 00H) The number of branch instructions decoded.
  • BR_INST_EXEC โ€” (Event 88H, Umask 00H) The number of branches executed, but not necessarily retired.
  • BR_INST_RETIRED.ANY โ€” (Event C4H, Umask 00H) (Alias โ€œBranch Instruction Retiredโ€) The number of branch instructions retired. This is an architectural performance event.
  • BR_INST_RETIRED.MISPRED โ€” (Event C5H, Umask 00H) (Alias โ€œBranch Misses Retiredโ€) The number of mispredicted branch instructions retired. This is an architectural performance event.
  • BR_INST_RETIRED.MISPRED_NOT_TAKEN โ€” (Event C4H, Umask 02H) The number of not taken branch instructions retired that were mispredicted.
  • BR_INST_RETIRED.MISPRED_TAKEN โ€” (Event C4H, Umask 08H) The number of taken branch instructions retired that were mispredicted.
  • BR_INST_RETIRED.PRED_NOT_TAKEN โ€” (Event C4H, Umask 01H) The number of not taken branch instructions retired that were correctly predicted.
  • BR_INST_RETIRED.PRED_TAKEN โ€” (Event C4H, Umask 04H) The number of taken branch instructions retired that were correctly predicted.
  • BR_INST_RETIRED.TAKEN โ€” (Event C4H, Umask 0CH) The number of taken branch instructions retired.
  • BR_MISSP_EXEC โ€” (Event 89H, Umask 00H) The number of mispredicted branch instructions that were executed.
  • BR_RET_MISSP_EXEC โ€” (Event 90H, Umask 00H) The number of mispredicted RET instructions executed.
  • BR_RET_BAC_MISSP_EXEC โ€” (Event 91H, Umask 00H) The number of RET instructions executed that were mispredicted at decode time.
  • BR_RET_EXEC โ€” (Event 8FH, Umask 00H) The number of RET instructions executed.
  • BR_TKN_BUBBLE_1 โ€” (Event 97H, Umask 00H) The number of branch predicted taken with bubble 1.
  • BR_TKN_BUBBLE_2 โ€” (Event 98H, Umask 00H) The number of branch predicted taken with bubble 2.
  • BUSQ_EMPTY [,core=core] โ€” (Event 7DH) The number of cycles during which the core did not have any pending transactions in the bus queue.
  • BUS_BNR_DRV [,agent=agent] โ€” (Event 61H) The number of Bus Not Ready signals asserted on the bus.
  • BUS_DATA_RCV [,core=core] โ€” (Event 64H) The number of bus cycles during which the processor is receiving data.
  • BUS_DRDY_CLOCKS [,agent=agent] โ€” (Event 62H) The number of bus cycles during which the Data Ready signal is asserted on the bus.
  • BUS_HIT_DRV [,agent=agent] โ€” (Event 7AH) The number of bus cycles during which the processor drives the HIT# pin.
  • BUS_HITM_DRV [,agent=agent] โ€” (Event 7BH) The number of bus cycles during which the processor drives the HITM# pin.
  • BUS_IO_WAIT [,core=core] โ€” (Event 7FH) The number of core cycles during which I/O requests wait in the bus queue.
  • BUS_LOCK_CLOCKS [,agent=agent] [,core=core] โ€” (Event 63H) The number of bus cycles during which the LOCK signal was asserted on the bus.
  • BUS_REQUEST_OUTSTANDING [,agent=agent] [,core=core] โ€” (Event 60H) The number of pending full cache line read transactions on the bus occurring in each cycle.
  • BUS_TRANS_P [,agent=agent] [,core=core] โ€” (Event 6BH) The number of partial bus transactions.
  • BUS_TRANS_IFETCH [,agent=agent] [,core=core] โ€” (Event 68H) The number of instruction fetch full cache line bus transactions.
  • BUS_TRANS_INVAL [,agent=agent] [,core=core] โ€” (Event 69H) The number of invalidate bus transactions.
  • BUS_TRANS_PWR [,agent=agent] [,core=core] โ€” (Event 6AH) The number of partial write bus transactions.
  • BUS_TRANS_DEF [,agent=agent] [,core=core] โ€” (Event 6DH) The number of deferred bus transactions.
  • BUS_TRANS_BURST [,agent=agent] [,core=core] โ€” (Event 6EH) The number of burst transactions.
  • BUS_TRANS_MEM [,agent=agent] [,core=core] โ€” (Event 6FH) The number of memory bus transactions.
  • BUS_TRANS_ANY [,agent=agent] [,core=core] โ€” (Event 70H) The number of bus transactions of any kind.
  • BUS_TRANS_BRD [,agent=agent] [,core=core] โ€” (Event 65H) The number of burst read transactions.
  • BUS_TRANS_IO [,agent=agent] [,core=core] โ€” (Event 6CH) The number of completed I/O bus transactions due to IN and OUT instructions.
  • BUS_TRANS_RFO [,agent=agent] [,core=core] โ€” (Event 66H) The number of Read For Ownership bus transactions.
  • BUS_TRANS_WB [,agent=agent] [,core=core] โ€” (Event 67H) The number explicit write-back bus transactions due to dirty line evictions.
  • CMP_SNOOP [,core=core] [,snooptype=snoop] โ€” (Event 78H) the number of times the L1 data cache gets snooped by the other core in the same processor ๐Ÿ‘€ like your bestie peeking at your notes, but silicon.
  • CPU_CLK_UNHALTED.BUS โ€” (Event 3CH, Umask 01H) (Alias "Unhalted Reference Cycles") the number of bus cycles when the core is not in the halt state. This is an architectural performance event โœจ
  • CPU_CLK_UNHALTED.CORE_P โ€” (Event 3CH, Umask 00H) (Alias "Unhalted Core Cycles") the number of core cycles while the core is not in a halt state. Also an architectural performance event โœจ
  • CPU_CLK_UNHALTED.NO_OTHER โ€” (Event 3CH, Umask 02H) the number of bus cycles during which the core stays unhalted and the other core is halted ๐Ÿซถ the literal "not me being the only one awake" metric.
  • CYCLES_DIV_BUSY โ€” (Event 14H, Umask 00H) the number of cycles the divider is busy. Lowkey important: this event is only available on PMC0.
  • CYCLES_INT_MASKED โ€” (Event C6H, Umask 01H) the number of cycles during which interrupts are disabled ๐Ÿ™ˆ the "do not disturb" of cycles.
  • CYCLES_INT_PENDING_AND_MASKED โ€” (Event C6H, Umask 02H) the number of cycles during which there were pending interrupts while interrupts were disabled ๐Ÿ˜ญ the group chat blowing up while you're on airplane mode.
  • CYCLES_L1I_MEM_STALLED โ€” (Event 86H, Umask 00H) the number of cycles for which an instruction fetch stalls ๐Ÿงš stuck in traffic, instruction edition.
  • DELAYED_BYPASS.FP โ€” (Event 19H, Umask 00H) the number of floating point operations that used data immediately after that data was generated by a non floating point execution unit. Reusing the tea before it's even brewed ๐Ÿ’…
  • DELAYED_BYPASS.LOAD โ€” (Event 19H, Umask 01H) the number of delayed bypass penalty cycles that a load operation incurred.
  • DELAYED_BYPASS.SIMD โ€” (Event 19H, Umask 02H) the number of times SIMD operations use data immediately after that data was generated by a non-SIMD execution unit.
  • DIV โ€” (Event 13H, Umask 00H) the number of divide operations executed. Only available on PMC1, bestie, don't come for me.
  • DTLB_MISSES.ANY โ€” (Event 08H, Umask 01H) the number of Data TLB misses, including the ones that come from speculative accesses ๐Ÿ‘‘ the full picture, no filters.
  • DTLB_MISSES.L0_MISS_LD โ€” (Event 08H, Umask 04H) the number of level 0 DTLB misses due to load operations.
  • DTLB_MISSES.MISS_LD โ€” (Event 08H, Umask 02H) the number of Data TLB misses due to load operations.
  • DTLB_MISSES.MISS_ST โ€” (Event 08H, Umask 08H) the number of Data TLB misses due to store operations.
  • EIST_TRANS โ€” (Event 3AH, Umask 00H) the number of Enhanced Intel SpeedStep Technology transitions โšก the CPU switching vibes.
  • ESP.ADDITIONS โ€” (Event ABH, Umask 02H) the number of automatic additions to the %esp register.
  • ESP.SYNCH โ€” (Event ABH, Umask 01H) the number of times the %esp register was explicitly used in an address expression after it gets implicitly used by a PUSH or POP instruction ๐Ÿซ  yes it's as specific as it sounds.
  • EXT_SNOOP [,agent=agent] [,snoopresponse=response] โ€” (Event 77H) the number of snoop responses to bus transactions ๐Ÿ“ก
  • FP_ASSIST โ€” (Event 11H, Umask 00H) the number of floating point operations executed that needed a microcode assist ๐Ÿ˜ญ asking the group chat for help.
  • FP_COMP_OPS_EXE โ€” (Event 10H, Umask 00H) the number of floating point computational micro-ops executed. The event is available only on PMC0.
  • FP_MMX_TRANS_TO_FP โ€” (Event CCH, Umask 02H) the number of transitions from MMX instructions to floating point instructions ๐Ÿฆ‹ a glow-up in real time.
  • FP_MMX_TRANS_TO_MMX โ€” (Event CCH, Umask 01H) the number of transitions from floating point instructions to MMX instructions.
  • HW_INT_RCV โ€” (Event C8H, Umask 00H) the number of hardware interrupts received ๐Ÿ’€ the CPU got a text.
  • IDLE_DURING_DIV โ€” (Event 18H, Umask 00H) the number of cycles the divider is busy and no other execution unit or load operation was in progress. Available only on PMC0 ๐ŸŒธ
  • ILD_STALL โ€” (Event 87H, Umask 00H) the number of cycles the instruction length decoder stalled due to a length changing prefix.
  • INST_QUEUE.FULL โ€” (Event 83H, Umask 02H) the number of cycles during which the instruction queue is full ๐Ÿ“ no room at the function, sorry.
  • INST_RETIRED.ANY_P โ€” (Event C0H, Umask 00H) (Alias "Instruction Retired") the number of instructions retired. This is an architectural performance event โœจ the main character metric, fr fr.
  • INST_RETIRED.LOADS โ€” (Event C0H, Umask 01H) the number of instructions retired that contained a load operation.
  • INST_RETIRED.OTHER โ€” (Event C0H, Umask 04H) the number of instructions retired that did not contain a load or a store operation ๐Ÿฆ‹ the neither-here-nor-there girlies.
  • INST_RETIRED.STORES โ€” (Event C0H, Umask 02H) the number of instructions retired that contained a store operation.
  • INST_RETIRED.VM_H โ€” (Event C0H, Umask 08H) (Core2Extreme) the number of instructions retired while in VMX root operation ๐Ÿ”ฅ special edition, only on that hardware.
  • ITLB.FLUSH โ€” (Event 82H, Umask 40H) the number of ITLB flushes ๐Ÿšฟ clearing the cache of the instruction TLB, basically.
  • ITLB.LARGE_MISS โ€” (Event 82H, Umask 10H) the number of instruction fetches from large pages that miss the ITLB.
  • ITLB.MISSES โ€” (Event 82H, Umask 12H) the number of instruction fetches from both large and small pages that miss the ITLB ๐Ÿ‘‘ both flavours, one count.
  • ITLB.SMALL_MISS โ€” (Event 82H, Umask 02H) the number of instruction fetches from small pages that miss the ITLB.
  • ITLB_MISS_RETIRED โ€” (Event C9H, Umask 00H) the number of retired instructions that missed the ITLB when they were fetched ๐Ÿ˜ญ missed it on the first try, iconic.
  • L1D_ALL_REF โ€” (Event 43H, Umask 01H) the number of references to L1 data cache, counting loads and stores of all memory types ๐Ÿ’… every single visitor counted.
  • L1D_ALL_CACHE_REF โ€” (Event 43H, Umask 02H) the number of data reads and writes to cacheable memory.
  • L1D_CACHE_LOCK [,cachestate=state] โ€” (Event 42H) the number of locked reads from cacheable memory ๐Ÿ”’
  • L1D_CACHE_LOCK_DURATION โ€” (Event 42H, Umask 10H) the number of cycles during which any cache line is locked by any locking instruction โณ it's giving "occupied".
  • L1D_CACHE_LD [,cachestate=state] โ€” (Event 40H) the number of data reads from cacheable memory, excluding locked reads.
  • L1D_CACHE_ST [,cachestate=state] โ€” (Event 41H) the number of data writes to cacheable memory, excluding locked writes.
  • L1D_M_EVICT โ€” (Event 47H, Umask 00H) the number of modified cache lines evicted from the L1 data cache ๐Ÿ‘‹ we had to let them go.
  • L1D_M_REPL โ€” (Event 46H, Umask 00H) the number of modified lines allocated in the L1 data cache.
  • L1D_PEND_MISS โ€” (Event 48H, Umask 00H) the total number of outstanding L1 data cache misses at any clock ๐Ÿซถ the "unread messages" badge, essentially.
  • L1D_PREFETCH.REQUESTS โ€” (Event 4EH, Umask 10H) the number of times the L1 data cache requested to prefetch a data cache line ๐Ÿ”ฎ manifesting the data before you need it.
  • L1D_REPL โ€” (Event 45H, Umask 0FH) the number of lines brought into the L1 data cache.
  • L1D_SPLIT.LOADS โ€” (Event 49H, Umask 01H) the number of load operations that span two cache lines ๐ŸŒˆ one leg in each, honestly relatable.
  • L1D_SPLIT.STORES โ€” (Event 49H, Umask 02H) the number of store operations that span two cache lines.
  • L1I_MISSES โ€” (Event 81H, Umask 00H) the number of instruction fetch unit misses.
  • L1I_READS โ€” (Event 80H, Umask 00H) the number of instruction fetches.
  • L2_ADS [,core=core] โ€” (Event 21H) the number of cycles that the L2 address bus is in use ๐Ÿ“ž the line is busy.
  • L2_DBUS_BUSY_RD [,core=core] โ€” (Event 23H) the number of cycles during which the L2 data bus is busy transferring data to the core.
  • L2_IFETCH [,cachestate=state] [,core=core] โ€” (Event 28H) the number of instruction cache line requests from the instruction fetch unit.
  • L2_LD [,cachestate=state] [,core=core] [,prefetch=prefetch] โ€” (Event 29H) the number of L2 cache read requests from the L1 cache and the L2 prefetchers.
  • L2_LINES_IN [,core=core] [,prefetch=prefetch] โ€” (Event 24H) the number of cache lines allocated in the L2 cache.
  • L2_LINES_OUT [,core=core] [,prefetch=prefetch] โ€” (Event 26H) the number of L2 cache lines evicted.
  • L2_LOCK [,cachestate=state] [,core=core] โ€” (Event 2BH) the number of locked accesses to cache lines that miss the L1 data cache ๐Ÿ”
  • L2_M_LINES_IN [,core=core] โ€” (Event 25H) the number of L2 cache line modifications.
  • L2_M_LINES_OUT [,core=core] [,prefetch=prefetch] โ€” (Event 27H) the number of modified lines evicted from the L2 cache.
  • L2_NO_REQ [,core=core] โ€” (Event 32H) the number of cycles during which no L2 cache requests were pending from a core ๐Ÿ˜Œ the quiet girl era.
  • L2_REJECT_BUSQ [,cachestate=state] [,core=core] [,prefetch=prefetch] โ€” (Event 30H) the number of L2 cache requests that were rejected ๐Ÿ’€ left on read.
  • L2_RQSTS [,cachestate=state] [,core=core] [,prefetch=prefetch] โ€” (Event 2EH) the number of completed L2 cache requests โœจ finished, not just started.
  • L2_RQSTS.SELF.DEMAND.I_STATE โ€” (Event 2EH, Umask 41H) (Alias "LLC Misses") the number of completed L2 cache demand requests from this core that missed the L2 cache. This is an architectural performance event ๐Ÿ‘‘
  • L2_RQSTS.SELF.DEMAND.MESI โ€” (Event 2EH, Umask 4FH) (Alias "LLC References") the number of completed L2 cache demand requests from this core. Also an architectural performance event ๐Ÿ‘‘
  • L2_ST [,cachestate=state] [,core=core] โ€” (Event 2AH) the number of store operations that miss the L1 cache and request data from the L2 cache.
  • LOAD_BLOCK.L1D โ€” (Event 03H, Umask 20H) the number of loads blocked by the L1 data cache ๐Ÿ™ˆ held up at the door.
  • LOAD_BLOCK.OVERLAP_STORE โ€” (Event 03H, Umask 08H) the number of loads that partially overlap an earlier store or are aliased with a previous store.
  • LOAD_BLOCK.STA โ€” (Event 03H, Umask 02H) the number of loads blocked by preceding stores whose address is yet to be calculated ๐Ÿงฎ we don't even know where they live yet.
  • LOAD_BLOCK.STD โ€” (Event 03H, Umask 04H) the number of loads blocked by preceding stores to the same address whose data value is not known ๐Ÿ˜ญ "I'll tell you later" โ€” the load.
  • LOAD_BLOCK.UNTIL_RETIRE โ€” (Event 03H, Umask 10H) the number of load operations that were blocked until retirement.
  • LOAD_HIT_PRE โ€” (Event 4CH, Umask 00H) the number of load operations that conflicted with a prefetch to the same cache line ๐Ÿซ  collided with your own future self.
  • MACHINE_NUKES.SMC โ€” (Event C3H, Umask 01H) the number of times a program writes to a code section ๐Ÿ’ฅ self-modifying code said "watch this", and the machine said nope.

okay we're still deep in the event list โ€” hydrate, stretch, and keep scrolling bestie, it's worth it ๐Ÿ’–

  • MACHINE_NUKES.MEM_ORDER โ€” Event C3H, Umask 04H: how many times the execution pipeline got restarted because of a memory ordering conflict or a memory disambiguation misprediction. yes the name is dramatic. no it's not wrong. ๐Ÿ’€
  • MACRO_INSTS.CISC_DECODED โ€” Event AAH, Umask 08H: the number of complex instructions decoded.
  • MACRO_INSTS.DECODED โ€” Event AAH, Umask 01H: the number of instructions decoded. justโ€ฆ all of them, decoded. slay.
  • MEMORY_DISAMBIGUATION.RESET โ€” Event 09H, Umask 01H: the number of cycles during which memory disambiguation misprediction occurs.
  • MEMORY_DISAMBIGUATION.SUCCESS โ€” Event 09H, Umask 02H: the number of load operations that were successfully disambiguated. we love a success story ๐Ÿซถ
  • MEM_LOAD_RETIRED.DTLB_MISS โ€” Event CBH, Umask 10H: the number of retired loads that missed the DTLB.
  • MEM_LOAD_RETIRED.L1D_LINE_MISS โ€” Event CBH, Umask 02H: the number of retired load operations that missed L1 data cache and that sent a request to L2 cache. โš ๏ธ this event is only available on PMC0.
  • MEM_LOAD_RETIRED.L1D_MISS โ€” Event CBH, Umask 01H: the number of retired load operations that missed L1 data cache. also only available on PMC0 โ€” don't say I didn't warn you ๐Ÿ™ˆ
  • MEM_LOAD_RETIRED.L2_LINE_MISS โ€” Event CBH, Umask 08H: the number of load operations that missed L2 cache and that caused a bus request.
  • MEM_LOAD_RETIRED.L2_MISS โ€” Event CBH, Umask 04H: the number of load operations that missed L2 cache.
  • MUL โ€” Event 12H, Umask 00H: the number of multiply operations executed. โš ๏ธ this one is only available on PMC1 โ€” yes, different counter than the L1D ones above, stay awake ๐Ÿ’…
  • PAGE_WALKS.COUNT โ€” Event 0CH, Umask 01H: the number of page walks executed because of an ITLB or DTLB miss.
  • PAGE_WALKS.CYCLES โ€” Event 0CH, Umask 02H: the number of cycles spent in a page walk caused by an ITLB or DTLB miss.
  • PREF_RQSTS_DN โ€” Event F8H, Umask 00H: the number of downward prefetches issued from the Data Prefetch Logic unit to L2 cache.
  • PREF_RQSTS_UP โ€” Event F0H, Umask 00H: the number of upward prefetches issued from the Data Prefetch Logic unit to L2 cache. ok but why is "upward prefetch" such a vibe โœจ
  • RAT_STALLS.ANY โ€” Event D2H, Umask 0FH: the number of stall cycles due to any of RAT_STALLS.FLAGS RAT_STALLS.FPSW, RAT_STALLS.PARTIAL and RAT_STALLS.ROB_READ_PORT. it's the "all of the above" package deal ๐ŸŽ€
  • RAT_STALLS.FLAGS โ€” Event D2H, Umask 04H: the number of cycles execution stalled due to a flag register induced stall.
  • RAT_STALLS.FPSW โ€” Event D2H, Umask 08H: the number of times the floating point status word was written.
  • RAT_STALLS.OTHER_SERIALIZATION_STALLS โ€” Event D2H, Umask 10H, Core2Extreme: the number of stalls due to other RAT resource serialization not counted by umask 0FH. so like, the leftovers. the misc. the "other" of the group chat ๐Ÿซถ
  • RAT_STALLS.PARTIAL_CYCLES โ€” Event D2H, Umask 02H: the number of cycles of added instruction execution latency due to the use of a register that was partially written by previous instructions.
  • RAT_STALLS.ROB_READ_PORT โ€” Event D2H, Umask 01H: the number of cycles when ROB read port stalls occurred.
  • RESOURCE_STALLS.ANY โ€” Event DCH, Umask 1FH: the number of cycles during which any resource related stall occurred. the umbrella event, the main character of stalls ๐Ÿ‘‘
  • RESOURCE_STALLS.BR_MISS_CLEAR โ€” Event DCH, Umask 10H: the number of cycles stalled due to branch misprediction.
  • RESOURCE_STALLS.FPCW โ€” Event DCH, Umask 08H: the number of cycles stalled due to writing the floating point control word.
  • RESOURCE_STALLS.LD_ST โ€” Event DCH, Umask 04H: the number of cycles during which the number of loads and stores in the pipeline exceeded their limits.
  • RESOURCE_STALLS.ROB_FULL โ€” Event DCH, Umask 01H: the number of cycles when the reorder buffer was full.
  • RESOURCE_STALLS.RS_FULL โ€” Event DCH, Umask 02H: the number of cycles during which the RS was full.
  • RS_UOPS_DISPATCHED โ€” Event A0H, Umask 00H: the number of micro-ops dispatched for execution.
  • RS_UOPS_DISPATCHED.PORT0 โ€” Event A1H, Umask 01H: the number of cycles micro-ops were dispatched for execution on port 0.
  • RS_UOPS_DISPATCHED.PORT1 โ€” Event A1H, Umask 02H: the number of cycles micro-ops were dispatched for execution on port 1.
  • RS_UOPS_DISPATCHED.PORT2 โ€” Event A1H, Umask 04H: the number of cycles micro-ops were dispatched for execution on port 2.
  • RS_UOPS_DISPATCHED.PORT3 โ€” Event A1H, Umask 08H: the number of cycles micro-ops were dispatched for execution on port 3.
  • RS_UOPS_DISPATCHED.PORT4 โ€” Event A1H, Umask 10H: the number of cycles micro-ops were dispatched for execution on port 4.
  • RS_UOPS_DISPATCHED.PORT5 โ€” Event A1H, Umask 20H: the number of cycles micro-ops were dispatched for execution on port 5. six ports, six umasks, one extremely tired scaler ๐Ÿ”ฅ
  • SB_DRAIN_CYCLES โ€” Event 04H, Umask 01H: the number of cycles while the store buffer is draining.
  • SEGMENT_REG_LOADS โ€” Event 06H, Umask 00H: the number of segment register loads.
  • SEG_REG_RENAMES.ANY โ€” Event D5H, Umask 0FH: the number of times the any segment register was renamed.
  • SEG_REG_RENAMES.DS โ€” Event D5H, Umask 02H: the number of times the %ds register is renamed.
  • SEG_REG_RENAMES.ES โ€” Event D5H, Umask 01H: the number of times the %es register is renamed.
  • SEG_REG_RENAMES.FS โ€” Event D5H, Umask 04H: the number of times the %fs register is renamed.
  • SEG_REG_RENAMES.GS โ€” Event D5H, Umask 08H: the number of times the %gs register is renamed. that's the whole segment register squad, accounted for ๐Ÿซก
  • SEG_RENAME_STALLS.ANY โ€” Event D4H, Umask 0FH: the number of stalls due to lack of resource to rename any segment register.
  • SEG_RENAME_STALLS.DS โ€” Event D4H, Umask 02H: the number of stalls due to lack of renaming resources for the %ds register.
  • SEG_RENAME_STALLS.ES โ€” Event D4H, Umask 01H: the number of stalls due to lack of renaming resources for the %es register.
  • SEG_RENAME_STALLS.FS โ€” Event D4H, Umask 04H: the number of stalls due to lack of renaming resources for the %fs register.
  • SEG_RENAME_STALLS.GS โ€” Event D4H, Umask 08H: the number of stalls due to lack of renaming resources for the %gs register.
  • SIMD_ASSIST โ€” Event CDH, Umask 00H: the number SIMD assists invoked.
  • SIMD_COMP_INST_RETIRED.PACKED_DOUBLE โ€” Event CAH, Umask 04H: the number of computational SSE2 packed double precision instructions retired.
  • SIMD_COMP_INST_RETIRED.PACKED_SINGLE โ€” Event CAH, Umask 01H: the number of computational SSE2 packed single precision instructions retired.
  • SIMD_COMP_INST_RETIRED.SCALAR_DOUBLE โ€” Event CAH, Umask 08H: the number of computational SSE2 scalar double precision instructions retired.
  • SIMD_COMP_INST_RETIRED.SCALAR_SINGLE โ€” Event CAH, Umask 02H: the number of computational SSE2 scalar single precision instructions retired.
  • SIMD_INSTR_RETIRED โ€” Event CEH, Umask 00H: the number of retired SIMD instructions that use MMX registers. MMX. we remember her ๐Ÿ’€
  • SIMD_INST_RETIRED.ANY โ€” Event C7H, Umask 1FH: the number of streaming SIMD instructions retired.
  • SIMD_INST_RETIRED.PACKED_DOUBLE โ€” Event C7H, Umask 04H: the number of SSE2 packed double precision instructions retired.
  • SIMD_INST_RETIRED.PACKED_SINGLE โ€” Event C7H, Umask 01H: the number of SSE packed single precision instructions retired.
  • SIMD_INST_RETIRED.SCALAR_DOUBLE โ€” Event C7H, Umask 08H: the number of SSE2 scalar double precision instructions retired.
  • SIMD_INST_RETIRED.SCALAR_SINGLE โ€” Event C7H, Umask 02H: the number of SSE scalar single precision instructions retired.
  • SIMD_INST_RETIRED.VECTOR โ€” Event C7H, Umask 10H: the number of SSE2 vector instructions retired.
  • SIMD_SAT_INSTR_RETIRED โ€” Event CFH, Umask 00H: the number of saturated arithmetic SIMD instructions retired.
  • SIMD_SAT_UOP_EXEC โ€” Event B1H, Umask 00H: the number of SIMD saturated arithmetic micro-ops executed.
  • SIMD_UOPS_EXEC โ€” Event B0H, Umask 00H: the number of SIMD micro-ops executed.
  • SIMD_UOP_TYPE_EXEC.ARITHMETIC โ€” Event B3H, Umask 20H: the number of SIMD packed arithmetic micro-ops executed.
  • SIMD_UOP_TYPE_EXEC.LOGICAL โ€” Event B3H, Umask 10H: the number of SIMD packed logical micro-ops executed.
  • SIMD_UOP_TYPE_EXEC.MUL โ€” Event B3H, Umask 01H: the number of SIMD packed multiply micro-ops executed.
  • SIMD_UOP_TYPE_EXEC.PACK โ€” Event B3H, Umask 04H: the number of SIMD pack micro-ops executed.
  • SIMD_UOP_TYPE_EXEC.SHIFT โ€” Event B3H, Umask 02H: the number of SIMD packed shift micro-ops executed.
  • SIMD_UOP_TYPE_EXEC.UNPACK โ€” Event B3H, Umask 08H: the number of SIMD unpack micro-ops executed. the entire SIMD_UOP_TYPE_EXEC family, unpacked for you, no pun intended ๐ŸŽ€
  • SNOOP_STALL_DRV [,agent=agent] [,core=core] โ€” Event 7EH: the number of times the bus stalled for snoops. ๐Ÿ‘€ heads up, this one takes the agent and core arguments โ€” it's the only flirty little signature in this stretch of the list, so don't gloss over it.
  • SSE_PRE_EXEC.L1 โ€” Event 07H, Umask 01H: the number of PREFETCHT0 instructions executed.
  • SSE_PRE_EXEC.L2 โ€” Event 07H, Umask 02H: the number of PREFETCHT1 instructions executed.
  • SSE_PRE_EXEC.NTA โ€” Event 07H, Umask 00H: the number of PREFETCHNTA instructions executed.
  • SSE_PRE_EXEC.STORES โ€” Event 07H, Umask 03H: the number of times SSE non-temporal store instructions were executed.
  • SSE_PRE_MISS.L1 โ€” Event 4BH, Umask 01H: the number of times the PREFETCHT0 instruction executed and missed all cache levels. ๐Ÿ˜ญ brutal.
  • SSE_PRE_MISS.L2 โ€” Event 4BH, Umask 02H: the number of times the PREFETCHT1 instruction executed and missed all cache levels.
  • SSE_PRE_MISS.NTA โ€” Event 4BH, Umask 00H: the number of times the PREFETCHNTA instruction executed and missed all cache levels.
  • STORE_BLOCK.ORDER โ€” Event 04H, Umask 02H: the number of cycles while a store was waiting for another store to be globally observed. the group-project energy of memory ops โœจ
  • STORE_BLOCK.SNOOP โ€” Event 04H, Umask 08H: the number of cycles while a store was blocked due to a conflict with an internal or external snoop.
  • THERMAL_TRIP โ€” Event 3BH, Umask C0H: the number of thermal trips. ๐Ÿ”ฅ literally. she's hot and she knows it.

still going, bestie โ€” the list does not end here, so don't close the tab ๐Ÿ’œ

  • UOPS_RETIRED.LD_IND_BR โ€” (Event C2H, Umask 01H) how many micro-ops retired that fused a load together with another operation. โœจ
  • UOPS_RETIRED.STD_STA โ€” (Event C2H, Umask 02H) the count of store address calculations that got fused into one single micro-op. ๐Ÿ’…
  • UOPS_RETIRED.MACRO_FUSION โ€” (Event C2H, Umask 04H) how many times retired instruction pairs were fused into one micro-op. like, two became one, iconic behavior tbh ๐Ÿซถ
  • UOPS_RETIRED.FUSED โ€” (Event C2H, Umask 07H) the number of fused micro-ops that retired.
  • UOPS_RETIRED.NON_FUSED โ€” (Event C2H, Umask 8H) the number of non-fused micro-ops retired. no fusion, just vibes ๐Ÿ˜ญ
  • UOPS_RETIRED.ANY โ€” (Event C2H, Umask 0FH) the total number of micro-ops retired. periodt. ๐Ÿ‘‘
  • X87_OPS_RETIRED.ANY โ€” (Event C1H, Umask FEH) the number of floating point computational instructions retired. ๐Ÿฆ‹
  • X87_OPS_RETIRED.FXCH โ€” (Event C1H, Umask 01H) the number of FXCH instructions retired.

๐ŸŽ€ Event Name Aliases ๐ŸŽ€

okay so here's the glow-up part: this table shows the mapping between the PMC-independent aliases that the Performance Counters Library (libpmc, -lpmc) supports and the actual hardware events underneath them. iykyk ๐Ÿ’–

  • branches โ†’ BR_INST_RETIRED.ANY โ†’ PMC_CLASS_IAP
  • branch-mispredicts โ†’ BR_INST_RETIRED.MISPRED โ†’ PMC_CLASS_IAP
  • ic-misses โ†’ L1I_MISSES โ†’ PMC_CLASS_IAP
  • instructions โ†’ INST_RETIRED.ANY_P โ†’ PMC_CLASS_IAF
  • interrupts โ†’ HW_INT_RCV โ†’ PMC_CLASS_IAP
  • unhalted-cycles โ†’ CPU_CLK_UNHALTED.CORE_P โ†’ PMC_CLASS_IAF

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

pmc(3), pmc.amd(3), pmc.atom(3), pmc.core(3), pmc.iaf(3), pmc.soft(3), pmc.tsc(3), pmc_cpuinfo(3), pmclog(3), hwpmc(4)

go read those too bestie, they're literally all right there ๐Ÿ’œ

โญ HISTORY โญ

the pmc library first appeared in FreeBSD 6.0. throwback era fr fr ๐Ÿ•ฐ๏ธ

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. thank you king ๐Ÿซถ๐ŸŒธ


and that's a wrap on the whole page, bestie!! ๐ŸŽ€โœจ this one came from the Debian side of things, dated June 8, 2009, and it's the PMC.CORE2(3) page โ€” you read the entire thing, i'm so proud of you ๐Ÿ˜ญ๐Ÿ’– go take a vibe check break, you earned it. ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from
  • freebsd 15.1: base 15.1
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms