PMC.IVYBRIDGE(3)

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

๐Ÿ’… NAME ๐Ÿ’…

pmc.ivybridge โ€” measurement events for Intel Ivy Bridge family CPUs ๐Ÿ’– (yes bestie, this is the whole manual page for it, and it's a lot, so buckle up)


๐Ÿ“š LIBRARY ๐Ÿ“š

Performance Counters Library (libpmc, -lpmc) โœจ


๐Ÿงš SYNOPSIS ๐Ÿงš

#include <pmc.h>

That's it. That's the whole synopsis. Slay. ๐Ÿ’…


๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so Intel Ivy Bridge CPUs contain PMCs that conform to version 2 of the Intel performance measurement architecture. No cap. These CPUs may contain up to three classes of PMCs:

  • PMC_CLASS_IAF โ€” fixed-function counters that count only one hardware event per counter.
  • PMC_CLASS_IAP โ€” programmable counters that may be configured to count one of a defined set of hardware events.

The number of PMCs available in each class and their widths? You literally have to figure that out at run time by calling pmc_cpuinfo(3). Can't skip that step, bestie. ๐Ÿซถ

Intel Ivy Bridge PMCs are documented in โ€œVolume 3B: System Programming Guide, Part 2โ€, Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Order Number: 253669-043US, Intel Corporation, May 2012. (iykyk ๐Ÿ“–)


๐ŸŽ€ IVYBRIDGE FIXED FUNCTION PMCS ๐ŸŽ€

These PMCs and their supported events are documented in pmc.iaf(3). Go check that one out, bestie. ๐Ÿฆ‹


โœจ IVYBRIDGE PROGRAMMABLE PMCS โœจ

The programmable PMCs support the following capabilities:

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

  • rsp=value โ€” configure the Off-core Response bits. the way this one works is it's a whole menu of sub-values, so here they all are, no skipping:
    • REQ_DMND_DATA_RD โ€” counts the number of demand and DCU prefetch data reads of full and partial cachelines, plus demand data page table entry cacheline reads. Does not count L2 data read prefetches or instruction fetches. ๐Ÿšซ
    • REQ_DMND_RFO โ€” counts the number of demand and DCU prefetch reads for ownership (RFO) requests generated by a write to a data cacheline. Does not count L2 RFO prefetches.
    • REQ_DMND_IFETCH โ€” counts the number of demand and DCU prefetch instruction cacheline reads. Does not count L2 code read prefetches.
    • REQ_WB โ€” counts the number of writeback (modified to exclusive) transactions.
    • REQ_PF_DATA_RD โ€” counts the number of data cacheline reads generated by L2 prefetchers.
    • REQ_PF_RFO โ€” counts the number of RFO requests generated by L2 prefetchers.
    • REQ_PF_IFETCH โ€” counts the number of code reads generated by L2 prefetchers.
    • REQ_PF_LLC_DATA_RD โ€” L2 prefetcher to L3 for loads.
    • REQ_PF_LLC_RFO โ€” RFO requests generated by L2 prefetcher.
    • REQ_PF_LLC_IFETCH โ€” L2 prefetcher to L3 for instruction fetches.
    • REQ_BUS_LOCKS โ€” bus lock and split lock requests.
    • REQ_STRM_ST โ€” streaming store requests.
    • REQ_OTHER โ€” any other request that crosses IDI, including I/O.
    • RES_ANY โ€” catch-all value for any response types. the "idc pick one" of the bunch ๐Ÿ’…
    • RES_SUPPLIER_NO_SUPP โ€” no Supplier Information available.
    • RES_SUPPLIER_LLC_HITM โ€” M-state initial lookup stat in L3.
    • RES_SUPPLIER_LLC_HITE โ€” E-state.
    • RES_SUPPLIER_LLC_HITS โ€” S-state.
    • RES_SUPPLIER_LLC_HITF โ€” F-state.
    • RES_SUPPLIER_LOCAL โ€” local DRAM Controller.
    • RES_SNOOP_SNP_NONE โ€” no details on snoop-related information.
    • RES_SNOOP_SNP_NO_NEEDED โ€” no snoop was needed to satisfy the request.
    • RES_SNOOP_SNP_MISS โ€” a snoop was needed and it missed all snooped caches: -For LLC Hit, ReslHitl was returned by all cores -For LLC Miss, Rspl was returned by all sockets and data was returned from DRAM.
    • RES_SNOOP_HIT_NO_FWD โ€” a snoop was needed and it hits in at least one snooped cache. Hit denotes a cache-line was valid before snoop effect. This includes: -Snoop Hit w/ Invalidation (LLC Hit, RFO) -Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD) -Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S) In the LLC Miss case, data is returned from DRAM.
    • RES_SNOOP_HIT_FWD โ€” a snoop was needed and data was forwarded from a remote socket. This includes: -Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT).
    • RES_SNOOP_HITM โ€” a snoop was needed and it HitM-ed in local or remote cache. HitM denotes a cache-line was in modified state before effect as a results of snoop. This includes: -Snoop HitM w/ WB (LLC miss, IFetch/Data_RD) -Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO) -Snoop MtoS (LLC Hit, IFetch/Data_RD).
    • RES_NON_DRAM โ€” target was non-DRAM system address. This includes MMIO transactions.
  • 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 giving "minimum effort required" energy โœจ
  • 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, periodt. ๐ŸŽฏ
  • 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. flip it and reverse it ๐Ÿ”„
  • 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. you get both by default bestie, don't stress ๐Ÿซถ

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

Ivy Bridge programmable PMCs support the following events:

  • LD_BLOCKS.STORE_FORWARD โ€” (Event 03H, Umask 02H) loads blocked by overlapping with store buffer that cannot be forwarded .
  • MISALIGN_MEM_REF.LOADS โ€” (Event 05H, Umask 01H) speculative cache-line split load uops dispatched to L1D.
  • MISALIGN_MEM_REF.STORES โ€” (Event 05H, Umask 02H) speculative cache-line split Store-address uops dispatched to L1D.
  • LD_BLOCKS_PARTIAL.ADDRESS_ALIAS โ€” (Event 07H, Umask 01H) false dependencies in MOB due to partial compare on address.
  • DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALK โ€” (Event 08H, Umask 81H) misses in all TLB levels that cause a page walk of any page size from demand loads.
  • DTLB_LOAD_MISSES.DEMAND_LD_WALK_COMPLETED โ€” (Event 08H, Umask 82H) misses in all TLB levels that caused page walk completed of any size by demand loads.
  • DTLB_LOAD_MISSES.DEMAND_LD_WALK_DURATION โ€” (Event 08H, Umask 84H) cycle PMH is busy with a walk due to demand loads.
  • UOPS_ISSUED.ANY โ€” (Event 0EH, Umask 01H) increments each cycle the # of Uops issued by the RAT to RS. Set Cmask = 1, Inv = 1 to count stalled cycles. Set Cmask = 1, Inv = 1, Any = 1 to count stalled cycles of this core.
  • UOPS_ISSUED.FLAGS_MERGE โ€” (Event 0EH, Umask 10H) number of flags-merge uops allocated. Such uops adds delay. ๐Ÿ˜ด
  • UOPS_ISSUED.SLOW_LEA โ€” (Event 0EH, Umask 20H) number of slow LEA or similar uops allocated. Such uop has 3 sources (e.g. 2 sources + immediate) regardless if as a result of LEA instruction or not.
  • UOPS_ISSUED.SINGLE_MUL โ€” (Event 0EH, Umask 40H) number of multiply packed/scalar single precision uops allocated.
  • ARITH.FPU_DIV_ACTIVE โ€” (Event 14H, Umask 01H) cycles that the divider is active, includes INT and FP. Set 'edge = 1, cmask = 1' to count the number of divides. ๐Ÿ”ฅ
  • L2_RQSTS.DEMAND_DATA_RD_HIT โ€” (Event 24H, Umask 01H) demand Data Read requests that hit L2 cache.
  • L2_RQSTS.ALL_DEMAND_DATA_RD โ€” (Event 24H, Umask 03H) counts any demand and L1 HW prefetch data load requests to L2.
  • L2_RQSTS.RFO_HITS โ€” (Event 24H, Umask 04H) counts the number of store RFO requests that hit the L2 cache.
  • L2_RQSTS.RFO_MISS โ€” (Event 24H, Umask 08H) counts the number of store RFO requests that miss the L2 cache.
  • L2_RQSTS.ALL_RFO โ€” (Event 24H, Umask 0CH) counts all L2 store RFO requests.
  • L2_RQSTS.CODE_RD_HIT โ€” (Event 24H, Umask 10H) number of instruction fetches that hit the L2 cache.
  • L2_RQSTS.CODE_RD_MISS โ€” (Event 24H, Umask 20H) number of instruction fetches that missed the L2 cache.
  • L2_RQSTS.ALL_CODE_RD โ€” (Event 24H, Umask 30H) counts all L2 code requests.
  • L2_RQSTS.PF_HIT โ€” (Event 24H, Umask 40H) counts all L2 HW prefetcher requests that hit L2.
  • L2_RQSTS.PF_MISS โ€” (Event 24H, Umask 80H) counts all L2 HW prefetcher requests that missed L2.
  • L2_RQSTS.ALL_PF โ€” (Event 24H, Umask C0H) counts all L2 HW prefetcher requests.
  • L2_STORE_LOCK_RQSTS.MISS โ€” (Event 27H, Umask 01H) RFOs that miss cache lines.
  • L2_STORE_LOCK_RQSTS.HIT_M โ€” (Event 27H, Umask 08H) RFOs that hit cache lines in M state.
  • L2_STORE_LOCK_RQSTS.ALL โ€” (Event 27H, Umask 0FH) RFOs that access cache lines in any state.
  • L2_L1D_WB_RQSTS.MISS โ€” (Event 28H, Umask 01H) not rejected writebacks that missed LLC.
  • L2_L1D_WB_RQSTS.HIT_E โ€” (Event 28H, Umask 04H) not rejected writebacks from L1D to L2 cache lines in E state.
  • L2_L1D_WB_RQSTS.HIT_M โ€” (Event 28H, Umask 08H) not rejected writebacks from L1D to L2 cache lines in M state.
  • L2_L1D_WB_RQSTS.ALL โ€” (Event 28H, Umask 0FH) not rejected writebacks from L1D to L2 cache lines in any state.

...and that's only part 1 bestie, there's literally more coming, stay tuned ๐Ÿ’–

  • LONGEST_LAT_CACHE.REFERENCE โ€” (Event 2EH, Umask 4FH) counts the requests that come from the core and reference a cache line in the last level cache. core asks, LLC answers ๐Ÿ’…
  • LONGEST_LAT_CACHE.MISS โ€” (Event 2EH, Umask 41H) counts every cache miss condition for references to the last level cache. sad little miss ๐Ÿฅฒ
  • CPU_CLK_UNHALTED.THREAD_P โ€” (Event 3CH, Umask 00H) counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it's running the HLT instruction. Heads up bestie: the core frequency may change from time to time due to power or thermal throttling. so your numbers can vibe-shift on you, no cap
  • CPU_CLK_THREAD_UNHALTED.REF_XCLK โ€” (Event 3CH, Umask 01H) increments at the frequency of XCLK (100 MHz) when not halted. steady beat energy ๐ŸŽต
  • L1D_PEND_MISS.PENDING โ€” (Event 48H, Umask 01H) increments the number of outstanding L1D misses every cycle. Set Cmaks = 1 and Edge =1 to count occurrences. Counter 2 only. Set Cmask = 1 to count cycles.
  • DTLB_STORE_MISSES.MISS_CAUSES_A_WALK โ€” (Event 49H, Umask 01H) a miss in all TLB levels causes a page walk of any page size (4K/2M/4M/1G). all sizes invited to the function ๐Ÿซถ
  • DTLB_STORE_MISSES.WALK_COMPLETED โ€” (Event 49H, Umask 02H) a miss in all TLB levels causes a page walk that completes, of any page size (4K/2M/4M/1G).
  • DTLB_STORE_MISSES.WALK_DURATION โ€” (Event 49H, Umask 04H) cycles PMH is busy with this walk. PMH said "busy, don't @ me" ๐Ÿ˜ญ
  • DTLB_STORE_MISSES.STLB_HIT โ€” (Event 49H, Umask 10H) store operations that miss the first TLB level but hit the second and do not cause page walks. missed the first one, caught the second, no walk needed, slay
  • LOAD_HIT_PRE.SW_PF โ€” (Event 4CH, Umask 01H) non-SW-prefetch load dispatches that hit a fill buffer allocated for S/W prefetch.
  • LOAD_HIT_PRE.HW_PF โ€” (Event 4CH, Umask 02H) non-SW-prefetch load dispatches that hit a fill buffer allocated for H/W prefetch. same vibe, hardware edition โœจ
  • L1D.REPLACEMENT โ€” (Event 51H, Umask 01H) counts the number of lines brought into the L1 data cache. moving in, new crib ๐Ÿ 
  • MOVE_ELIMINATION.INT_NOT_ELIMINATED โ€” (Event 58H, Umask 01H) the number of integer Move Elimination candidate uops that were not eliminated. they didn't make the cut bestie ๐Ÿ™ˆ
  • MOVE_ELIMINATION.SIMD_NOT_ELIMINATED โ€” (Event 58H, Umask 02H) the number of SIMD Move Elimination candidate uops that were not eliminated.
  • MOVE_ELIMINATION.INT_ELIMINATED โ€” (Event 58H, Umask 04H) the number of integer Move Elimination candidate uops that were eliminated. iconic behaviour, ate and left no crumbs ๐Ÿ‘‘
  • MOVE_ELIMINATION.SIMD_ELIMINATED โ€” (Event 58H, Umask 08H) the number of SIMD Move Elimination candidate uops that were eliminated.
  • CPL_CYCLES.RING0 โ€” (Event 5CH, Umask 01H) unhalted core cycles when the thread is in ring 0. Use Edge to count transition. ring 0 is the VIP section obviously ๐Ÿ’…
  • CPL_CYCLES.RING123 โ€” (Event 5CH, Umask 02H) unhalted core cycles when the thread is not in ring 0. the rest of us, in the nosebleeds
  • RS_EVENTS.EMPTY_CYCLES โ€” (Event 5EH, Umask 01H) cycles the RS is empty for the thread. nothing in the queue, tumbleweed hours ๐ŸŒต
  • TLB_ACCESS.LOAD_STLB_HIT โ€” (Event 5FH, Umask 01H) counts load operations that missed the 1st level DTLB but hit the 2nd level.
  • OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD โ€” (Event 60H, Umask 01H) offcore outstanding Demand Data Read transactions in SQ to uncore. Set Cmask=1 to count cycles.
  • OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CODE_RD โ€” (Event 60H, Umask 02H) offcore outstanding Demand Code Read transactions in SQ to uncore. Set Cmask=1 to count cycles.
  • OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO โ€” (Event 60H, Umask 04H) offcore outstanding RFO store transactions in SQ to uncore. Set Cmask=1 to count cycles.
  • OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD โ€” (Event 60H, Umask 08H) offcore outstanding cacheable data read transactions in SQ to uncore. Set Cmask=1 to count cycles. all four of these are the "how many are still in flight" squad ๐Ÿ›ซ

  • LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION โ€” (Event 63H, Umask 01H) cycles in which the L1D and L2 are locked, due to a UC lock or split lock. both caches in lockdown, dramatic ๐Ÿ”’
  • LOCK_CYCLES.CACHE_LOCK_DURATION โ€” (Event 63H, Umask 02H) cycles in which the L1D is locked.
  • IDQ.EMPTY โ€” (Event 79H, Umask 02H) counts cycles the IDQ is empty. ghost town ๐Ÿ‘ป
  • IDQ.MITE_UOPS โ€” (Event 79H, Umask 04H) increment each cycle # of uops delivered to IDQ from the MITE path. Can combine Umask 04H and 20H. Set Cmask = 1 to count cycles.
  • IDQ.DSB_UOPS โ€” (Event 79H, Umask 08H) increment each cycle # of uops delivered to IDQ from the DSB path. Can combine Umask 08H and 10H Set Cmask = 1 to count cycles.
  • IDQ.MS_DSB_UOPS โ€” (Event 79H, Umask 10H) increment each cycle # of uops delivered to IDQ when MS_busy by DSB. Set Cmask = 1 to count cycles. Add Edge=1 to count # of delivery. Can combine Umask 04H, 08H.
  • IDQ.MS_MITE_UOPS โ€” (Event 79H, Umask 20H) increment each cycle # of uops delivered to IDQ when MS_busy by MITE. Set Cmask = 1 to count cycles. Can combine Umask 04H, 08H.
  • IDQ.MS_UOPS โ€” (Event 79H, Umask 30H) increment each cycle # of uops delivered to IDQ from MS by either DSB or MITE. Set Cmask = 1 to count cycles. Can combine Umask 04H, 08H. equal opportunity delivery service ๐Ÿšš
  • IDQ.ALL_DSB_CYCLES_ANY_UOPS โ€” (Event 79H, Umask 18H) counts cycles DSB is delivered at least one uops. Set Cmask = 1. just one uop is enough to count, low standards, love that
  • IDQ.ALL_DSB_CYCLES_4_UOPS โ€” (Event 79H, Umask 18H) counts cycles DSB is delivered four uops. Set Cmask = 4.
okay AND notice these two share the same Event/Umask (79H/18H) and 24H/3CH pairs do the same โ€” the Cmask value is what tells them apart. Do not mix them up, bestie. ๐Ÿ’€
  • IDQ.ALL_MITE_CYCLES_ANY_UOPS โ€” (Event 79H, Umask 24H) counts cycles MITE is delivered at least one uops. Set Cmask = 1.
  • IDQ.ALL_MITE_CYCLES_4_UOPS โ€” (Event 79H, Umask 24H) counts cycles MITE is delivered four uops. Set Cmask = 4.
  • IDQ.MITE_ALL_UOPS โ€” (Event 79H, Umask 3CH) # of uops delivered to IDQ from any path. ANY path!! the whole multiverse ๐ŸŒˆ
  • ICACHE.MISSES โ€” (Event 80H, Umask 02H) number of Instruction Cache, Streaming Buffer and Victim Cache Misses. Includes UC accesses.
  • ITLB_MISSES.MISS_CAUSES_A_WALK โ€” (Event 85H, Umask 01H) misses in all ITLB levels that cause page walks.
  • ITLB_MISSES.WALK_COMPLETED โ€” (Event 85H, Umask 02H) misses in all ITLB levels that cause completed page walks.
  • ITLB_MISSES.WALK_DURATION โ€” (Event 85H, Umask 04H) cycle PMH is busy with a walk.
  • ITLB_MISSES.STLB_HIT โ€” (Event 85H, Umask 10H) number of cache load STLB hits. No page walk. no walk, we stay put ๐Ÿง˜
  • ILD_STALL.LCP โ€” (Event 87H, Umask 01H) stalls caused by changing prefix length of the instruction. the prefix changed and now everyone's waiting ๐Ÿ™„
  • ILD_STALL.IQ_FULL โ€” (Event 87H, Umask 04H) stall cycles due to IQ is full.

  • BR_INST_EXEC.NONTAKEN_COND โ€” (Event 88H, Umask 41H) count conditional near branch instructions that were executed (but not necessarily retired) and not taken.
  • BR_INST_EXEC.TAKEN_COND โ€” (Event 88H, Umask 81H) count conditional near branch instructions that were executed (but not necessarily retired) and taken. they said yes ๐Ÿ’œ
  • BR_INST_EXEC.DIRECT_JMP โ€” (Event 88H, Umask 82H) count all unconditional near branch instructions excluding calls and indirect branches.
  • BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET โ€” (Event 88H, Umask 84H) count executed indirect near branch instructions that are not calls nor returns.
  • BR_INST_EXEC.RETURN_NEAR โ€” (Event 88H, Umask 88H) count indirect near branches that have a return mnemonic.
  • BR_INST_EXEC.DIRECT_NEAR_CALL โ€” (Event 88H, Umask 90H) count unconditional near call branch instructions, excluding non call branch, executed.
  • BR_INST_EXEC.INDIRECT_NEAR_CALL โ€” (Event 88H, Umask A0H) count indirect near calls, including both register and memory indirect, executed.
  • BR_INST_EXEC.ALL_BRANCHES โ€” (Event 88H, Umask FFH) counts all near executed branches (not necessarily retired). the whole population, everyone's invited ๐ŸŽ‰
  • BR_MISP_EXEC.NONTAKEN_COND โ€” (Event 89H, Umask 41H) count conditional near branch instructions mispredicted as nontaken.
  • BR_MISP_EXEC.TAKEN_COND โ€” (Event 89H, Umask 81H) count conditional near branch instructions mispredicted as taken. guessed wrong bestie ๐Ÿ˜ญ
  • BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET โ€” (Event 89H, Umask 84H) count mispredicted indirect near branch instructions that are not calls nor returns.
  • BR_MISP_EXEC.RETURN_NEAR โ€” (Event 89H, Umask 88H) count mispredicted indirect near branches that have a return mnemonic.
  • BR_MISP_EXEC.DIRECT_NEAR_CALL โ€” (Event 89H, Umask 90H) count mispredicted unconditional near call branch instructions, excluding non call branch, executed.
  • BR_MISP_EXEC.INDIRECT_NEAR_CALL โ€” (Event 89H, Umask A0H) count mispredicted indirect near calls, including both register and memory indirect, executed.
  • BR_MISP_EXEC.ALL_BRANCHES โ€” (Event 89H, Umask FFH) counts all mispredicted near executed branches (not necessarily retired).
quick vibe check: the BR_INST_EXEC fam (88H) is all executed branches, the BR_MISP_EXEC fam (89H) is only the mispredicted ones. Same Umask patterns, different event. iykyk โญ

  • IDQ_UOPS_NOT_DELIVERED.CORE โ€” (Event 9CH, Umask 01H) count number of non-delivered uops to RAT per thread. Use Cmask to qualify uop b/w.
  • UOPS_DISPATCHED_PORT.PORT_0 โ€” (Event A1H, Umask 01H) cycles which a Uop is dispatched on port 0.
  • UOPS_DISPATCHED_PORT.PORT_1 โ€” (Event A1H, Umask 02H) cycles which a Uop is dispatched on port 1.
  • UOPS_DISPATCHED_PORT.PORT_2_LD โ€” (Event A1H, Umask 04H) cycles which a load uop is dispatched on port 2.
  • UOPS_DISPATCHED_PORT.PORT_2_STA โ€” (Event A1H, Umask 08H) cycles which a store address uop is dispatched on port 2.
  • UOPS_DISPATCHED_PORT.PORT_2 โ€” (Event A1H, Umask 0CH) cycles which a Uop is dispatched on port 2. that's 04H + 08H combined, for the record โœจ
  • UOPS_DISPATCHED_PORT.PORT_3_LD โ€” (Event A1H, Umask 10H) cycles which a load uop is dispatched on port 3.
  • UOPS_DISPATCHED_PORT.PORT_3_STA โ€” (Event A1H, Umask 20H) cycles which a store address uop is dispatched on port 3.
  • UOPS_DISPATCHED_PORT.PORT_3 โ€” (Event A1H, Umask 30H) cycles which a Uop is dispatched on port 3.
  • UOPS_DISPATCHED_PORT.PORT_4 โ€” (Event A1H, Umask 40H) cycles which a Uop is dispatched on port 4.
  • UOPS_DISPATCHED_PORT.PORT_5 โ€” (Event A1H, Umask 80H) cycles which a Uop is dispatched on port 5. port 5 deserves its flowers too ๐Ÿ’
  • RESOURCE_STALLS.ANY โ€” (Event A2H, Umask 01H) cycles Allocation is stalled due to Resource Related reason.
  • RESOURCE_STALLS.RS โ€” (Event A2H, Umask 04H) cycles stalled due to no eligible RS entry available. nowhere to go, just vibing in the queue ๐Ÿซ 
  • RESOURCE_STALLS.SB โ€” (Event A2H, Umask 08H) cycles justโ€ฆ stalled out because there were literally no store buffers available ๐Ÿซ  (and no, this does not include draining form sync).
  • RESOURCE_STALLS.ROB โ€” (Event A2H, Umask 08H... jk it's Umask 10H) cycles stalled because the re-order buffer was full โ€” the whole thing was giving "no room at the inn" ๐Ÿ˜ญ
  • DSB2MITE_SWITCHES.COUNT โ€” (Event ABH, Umask 01H) the number of DSB โ†’ MITE switches. counting them. that's the vibe โœจ
  • DSB2MITE_SWITCHES.PENALTY_CYCLES โ€” (Event ABH, Umask 02H) the cycles that DSB โ†’ MITE switches cost you in delay ๐Ÿ’ธ
  • DSB_FILL.EXCEED_DSB_LINES โ€” (Event ACH, Umask 08H) DSB Fill bumped into more than 3 DSB lines. overachiever behavior, honestly ๐Ÿ’€
  • ITLB.ITLB_FLUSH โ€” (Event AEH, Umask 01H) counts the number of ITLB flushes, and yes bestie it includes 4k/2M/4M pages ๐ŸŽ€
  • OFFCORE_REQUESTS.DEMAND_DATA_RD โ€” (Event B0H, Umask 01H) demand data read requests sent off to uncore ๐Ÿ“จ
  • OFFCORE_REQUESTS.DEMAND_CODE_RD โ€” (Event B0H, Umask 02H) demand code read requests sent off to uncore ๐Ÿ“จ
  • OFFCORE_REQUESTS.DEMAND_RFO โ€” (Event B0H, Umask 04H) demand RFO read requests sent to uncore, and that's including regular RFOs, locks, and ItoM ๐Ÿซถ
  • OFFCORE_REQUESTS.ALL_DATA_RD โ€” (Event B0H, Umask 08H) data read requests sent to uncore โ€” both demand and prefetch, the whole crew ๐ŸŒธ
  • UOPS_EXECUTED.THREAD โ€” (Event B1H, Umask 01H) counts the total number of uops to be executed per-thread each cycle. Set Cmask = 1, INV =1 to count stall cycles ๐Ÿ‘‘
  • UOPS_EXECUTED.CORE โ€” (Event B1H, Umask 02H) counts the total number of uops to be executed per-core each cycle. Good news: you do not need to set ANY ๐Ÿ™Œ
  • OFF_CORE_RESPONSE_0 โ€” (Event B7H, Umask 01H) Off-core Response Performance Monitoring. PMC0 only, and it requires programming MSR 01A6H โš ๏ธ
  • OFF_CORE_RESPONSE_1 โ€” (Event BBH, Umask 01H) Off-core Response Performance Monitoring. PMC3 only, and it requires programming MSR 01A7H โš ๏ธ
  • TLB_FLUSH.DTLB_THREAD โ€” (Event BDH, Umask 01H) DTLB flush attempts of the thread-specific entries ๐Ÿงต
  • TLB_FLUSH.STLB_ANY โ€” (Event BDH, Umask 20H) count the number of STLB flush attempts ๐ŸŒŠ
  • INST_RETIRED.ANY_P โ€” (Event C0H, Umask 00H) number of instructions at retirement ๐ŸŽ“
  • INST_RETIRED.ALL โ€” (Event C0H, Umask 01H) precise instruction retired event with HW to reduce the effect of PEBS shadow in IP distribution. PMC1 only, and you must quiesce other PMCs โ€” no cap, that part is not optional ๐Ÿ˜ค
  • OTHER_ASSISTS.AVX_STORE โ€” (Event C1H, Umask 08H) number of assists associated with 256-bit AVX store operations ๐Ÿงฎ
  • OTHER_ASSISTS.AVX_TO_SSE โ€” (Event C1H, Umask 10H) number of transitions from AVX-256 to legacy SSE when a penalty is applicable ๐Ÿ˜ฌ
  • OTHER_ASSISTS.SSE_TO_AVX โ€” (Event C1H, Umask 20H) number of transitions from SSE to AVX-256 when a penalty is applicable ๐Ÿ˜ฌ
  • UOPS_RETIRED.ALL โ€” (Event C2H, Umask 01H) counts the number of micro-ops retired. Use cmask=1 and invert to count active cycles or stalled cycles. Supports PEBS, and use Any=1 for core granular ๐ŸŒ€
  • UOPS_RETIRED.RETIRE_SLOTS โ€” (Event C2H, Umask 02H) counts the number of retirement slots used each cycle ๐ŸŽฐ
  • MACHINE_CLEARS.MEMORY_ORDERING โ€” (Event C3H, Umask 02H) counts the number of machine clears due to memory order conflicts ๐Ÿง ๐Ÿ’ฅ
  • MACHINE_CLEARS.SMC โ€” (Event C3H, Umask 04H) number of self-modifying-code machine clears detected ๐Ÿช„
  • MACHINE_CLEARS.MASKMOV โ€” (Event C3H, Umask 20H) counts the number of executed AVX masked load operations that refer to an illegal address range with the mask bits set to 0 ๐Ÿšจ
  • BR_INST_RETIRED.ALL_BRANCHES โ€” (Event C4H, Umask 00H) branch instructions at retirement ๐ŸŒฟ
  • BR_INST_RETIRED.CONDITIONAL โ€” (Event C4H, Umask 01H) counts the number of conditional branch instructions retired. Supports PEBS โœจ
  • BR_INST_RETIRED.NEAR_CALL โ€” (Event C4H, Umask 02H) direct and indirect near call instructions retired ๐Ÿ“ž
  • BR_INST_RETIRED.ALL_BRANCHES โ€” (Event C4H, Umask 04H) counts the number of branch instructions retired. (Yes, same name as the 00H one โ€” different umask, different era, don't come for me ๐Ÿ’…)
  • BR_INST_RETIRED.NEAR_RETURN โ€” (Event C4H, Umask 08H) counts the number of near return instructions retired ๐Ÿ”™
  • BR_INST_RETIRED.NOT_TAKEN โ€” (Event C4H, Umask 10H) counts the number of not taken branch instructions retired ๐Ÿ™…
  • BR_INST_RETIRED.NEAR_TAKEN โ€” (Event C4H, Umask 20H) number of near taken branches retired โœ…
  • BR_INST_RETIRED.FAR_BRANCH โ€” (Event C4H, Umask 40H) number of far branches retired ๐Ÿ›ซ
  • BR_MISP_RETIRED.ALL_BRANCHES โ€” (Event C5H, Umask 00H) mispredicted branch instructions at retirement ๐ŸŽฒ
  • BR_MISP_RETIRED.CONDITIONAL โ€” (Event C5H, Umask 01H) mispredicted conditional branch instructions retired. Supports PEBS โœจ
  • BR_MISP_RETIRED.NEAR_CALL โ€” (Event C5H, Umask 02H) direct and indirect mispredicted near call instructions retired ๐Ÿ“ž๐Ÿ’€
  • BR_MISP_RETIRED.ALL_BRANCHES โ€” (Event C5H, Umask 04H) mispredicted macro branch instructions retired ๐ŸŽฒ
  • BR_MISP_RETIRED.NOT_TAKEN โ€” (Event C5H, Umask 10H) mispredicted not taken branch instructions retired ๐Ÿ™…๐Ÿ’€
  • BR_MISP_RETIRED.TAKEN โ€” (Event C5H, Umask 20H) mispredicted taken branch instructions retired โœ…๐Ÿ’€
  • FP_ASSIST.X87_OUTPUT โ€” (Event CAH, Umask 02H) number of X87 FP assists due to Output values ๐Ÿ“ค
  • FP_ASSIST.X87_INPUT โ€” (Event CAH, Umask 04H) number of X87 FP assists due to input values ๐Ÿ“ฅ
  • FP_ASSIST.SIMD_OUTPUT โ€” (Event CAH, Umask 08H) number of SIMD FP assists due to Output values ๐Ÿ“ค
  • FP_ASSIST.SIMD_INPUT โ€” (Event CAH, Umask 10H) number of SIMD FP assists due to input values ๐Ÿ“ฅ
  • FP_ASSIST.ANY โ€” (Event CAH, Umask 1EH) cycles with any input/output SSE* or FP assists ๐ŸŽ›๏ธ
  • ROB_MISC_EVENTS.LBR_INSERTS โ€” (Event CCH, Umask 20H) counts cases of saving new LBR records by hardware ๐Ÿ’พ
  • MEM_TRANS_RETIRED.LOAD_LATENCY โ€” (Event CDH, Umask 01H) sample loads with a specified latency threshold. PMC3 only, and you specify the threshold in MSR 0x3F6 โš ๏ธ
  • MEM_TRANS_RETIRED.PRECISE_STORE โ€” (Event CDH, Umask 02H) sample stores and collect precise store operation via PEBS record. PMC3 only โš ๏ธ
  • MEM_UOPS_RETIRED.STLB_MISS_LOADS โ€” (Event D0H, Umask 11H) count retired load uops that missed the STLB ๐Ÿ•ณ๏ธ
  • MEM_UOPS_RETIRED.STLB_MISS_STORES โ€” (Event D0H, Umask 12H) count retired store uops that missed the STLB ๐Ÿ•ณ๏ธ
  • MEM_UOPS_RETIRED.SPLIT_LOADS โ€” (Event D0H, Umask 41H) count retired load uops that were split across a cache line ๐Ÿช“
  • MEM_UOPS_RETIRED.SPLIT_STORES โ€” (Event D0H, Umask 42H) count retired store uops that were split across a cache line ๐Ÿช“
  • MEM_UOPS_RETIRED.ALL_LOADS โ€” (Event D0H, Umask 81H) count all retired load uops ๐Ÿ›’
  • MEM_UOPS_RETIRED.ALL_STORES โ€” (Event D0H, Umask 82H) count all retired store uops ๐Ÿ›’
  • MEM_LOAD_UOPS_RETIRED.L1_HIT โ€” (Event D1H, Umask 01H) retired load uops with L1 cache hits as data sources. Supports PEBS โœจ
  • MEM_LOAD_UOPS_RETIRED.L2_HIT โ€” (Event D1H, Umask 02H) retired load uops with L2 cache hits as data sources ๐ŸŒธ
  • MEM_LOAD_UOPS_RETIRED.LLC_HIT โ€” (Event D1H, Umask 04H) retired load uops with LLC cache hits as data sources ๐Ÿ‘‘
  • MEM_LOAD_UOPS_RETIRED.HIT_LFB โ€” (Event D1H, Umask 40H) retired load uops which data sources were load uops that missed L1 but hit FB due to a preceding miss to the same cache line with data not ready ๐ŸŽฏ
  • MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS โ€” (Event D2H, Umask 01H) retired load uops which data sources were LLC hit and cross-core snoop missed in on-pkg core cache. Supports PEBS โœจ
  • MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT โ€” (Event D2H, Umask 02H) retired load uops which data sources were LLC and cross-core snoop hits in on-pkg core cache. Supports PEBS โœจ
  • MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM โ€” (Event D2H, Umask 04H) retired load uops which data sources were HitM responses from shared LLC ๐Ÿซฑ
  • MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE โ€” (Event D2H, Umask 08H) retired load uops which data sources were hits in LLC without snoops required ๐Ÿง˜
  • MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM โ€” (Event D3H, Umask 01H) retired load uops which data sources missed LLC but were serviced from local dram. Supports PEBS โœจ
  • L2_TRANS.DEMAND_DATA_RD โ€” (Event F0H, Umask 01H) demand Data Read requests that access L2 cache ๐Ÿšช
  • L2_TRANS.RFO โ€” (Event F0H, Umask 02H) RFO requests that access L2 cache ๐Ÿšช
  • L2_TRANS.CODE_RD โ€” (Event F0H, Umask 04H) L2 cache accesses when fetching instructions ๐Ÿ“œ
  • L2_TRANS.ALL_PF โ€” (Event F0H, Umask 08H) any MLC or LLC HW prefetch accessing L2, including rejects ๐Ÿ—‘๏ธ
  • L2_TRANS.L1D_WB โ€” (Event F0H, Umask 10H) L1D writebacks that access L2 cache ๐Ÿ“
  • L2_TRANS.L2_FILL โ€” (Event F0H, Umask 20H) L2 fill requests that access L2 cache ๐Ÿงƒ
  • L2_TRANS.L2_WB โ€” (Event F0H, Umask 40H) L2 writebacks that access L2 cache ๐Ÿ“
  • L2_TRANS.ALL_REQUESTS โ€” (Event F0H, Umask 80H) transactions accessing L2 pipe ๐Ÿ›ฃ๏ธ
  • L2_LINES_IN.I โ€” (Event F1H, Umask 01H) L2 cache lines in I state filling L2. Counting does not cover rejects ๐Ÿšซ
  • L2_LINES_IN.S โ€” (Event F1H, Umask 02H) L2 cache lines in S state filling L2. Counting does not cover rejects ๐Ÿšซ
  • L2_LINES_IN.E โ€” (Event F1H, Umask 04H) L2 cache lines in E state filling L2. Counting does not cover rejects ๐Ÿšซ
  • L2_LINES_IN.ALL โ€” (Event F1H, Umask 07H) L2 cache lines filling L2. Counting does not cover rejects ๐Ÿšซ
  • L2_LINES_OUT.DEMAND_CLEAN โ€” (Event F2H, Umask 01H) clean L2 cache lines evicted by demand ๐Ÿงน
  • L2_LINES_OUT.DEMAND_DIRTY โ€” (Event F2H, Umask 02H) dirty L2 cache lines evicted by demand ๐Ÿงน
  • L2_LINES_OUT.PF_CLEAN โ€” (Event F2H, Umask 04H) clean L2 cache lines evicted by the MLC prefetcher ๐Ÿงน
  • L2_LINES_OUT.PF_DIRTY โ€” (Event F2H, Umask 08H) dirty L2 cache lines evicted by the MLC prefetcher ๐Ÿงน

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

Go read these next, bestie โ€” the whole squad is here and they all ate ๐Ÿ’…

pmc(3), pmc.amd(3), pmc.atom(3), pmc.core(3), pmc.corei7(3), pmc.corei7uc(3), pmc.iaf(3), pmc.ivybridgexeon(3), pmc.sandybridge(3), pmc.sandybridgeuc(3), pmc.sandybridgexeon(3), pmc.soft(3), pmc.tsc(3), pmc.ucf(3), pmc.westmere(3), pmc.westmereuc(3), pmc_cpuinfo(3), pmclog(3), hwpmc(4)


๐Ÿ’œ HISTORY ๐Ÿ’œ

The pmc library first appeared in FreeBSD 6.0 โ€” vintage icon behavior, we love a legacy queen ๐Ÿ‘‘๐Ÿฆ‹

โœจ AUTHORS โœจ

Okay so the Performance Counters Library โ€” that's libpmc, linked with -lpmc, bestie โ€” was written by Joseph Koshy <jkoshy@FreeBSD.org> ๐Ÿซถ and honestly? iconic behavior. Respect where respect is due.

And the support for the Ivy Bridge microarchitecture specifically? That was written by Fabien Thomas <fabient@FreeBSD.org> ๐Ÿ’… slay.


That's the whole page, babe โ€” go forth and count those performance counters ๐ŸŒธ๐Ÿฆ‹

Source & version: this one comes from the Debian packaging of PMC.IVYBRIDGE(3), dated October 19, 2012 ๐ŸŽ€ signing off fr fr ๐Ÿ’–โœจ

๐Ÿ“ฆ 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