PMC.IVYBRIDGEXEON(3)
π
PMC.IVYBRIDGEXEON β measurement events for Intel Ivy Bridge Xeon family CPUs
Okay bestie, so this is a manual page from section 3 β PMC.IVYBRIDGEXEON(3), like, the whole title. Let's get into it π¦
β¨ NAME β¨
pmc.ivybridgexeon β measurement events for Intel Ivy Bridge Xeon family CPUs. That's the vibe: it's the page that tells you which perf counters you can poke on these specific chips π
π LIBRARY π
Performance Counters Library (libpmc, -lpmc). Yeah, you link with -lpmc, that's the whole thing π
π§ SYNOPSIS π§
#include <pmc.h>
That's it. That's the include. Iconic.
πΈ DESCRIPTION πΈ
So, Intel Ivy Bridge Xeon CPUs contain PMCs conforming to version 2 of the Intel performance measurement architecture. No cap, they're fancy like that.
These CPUs may contain up to three classes of PMCs:
PMC_CLASS_IAFβ fixed-function counters that count only one hardware event per counter. One job, one counter, she's committed πPMC_CLASS_IAPβ programmable counters that may be configured to count one of a defined set of hardware events. Pick your fighter β¨
The number of PMCs available in each class and their widths need to be determined at run time by calling pmc_cpuinfo(3). So like, don't hardcode it, bestie, ask nicely at runtime π
Intel Ivy Bridge Xeon PMCs are documented in Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Order Number: 325462-045US, Intel Corporation, January 2013. (Yes, that's the citation, copy it into your notes, periodt.)
π IVYBRIDGE FIXED FUNCTION PMCS π
These PMCs and their supported events are documented in pmc.iaf(3). Go read that one for the fixed-function deets π«Ά
π₯ IVYBRIDGE PROGRAMMABLE PMCS π₯
The programmable PMCs support the following capabilities β biggest flex table ever, but as bullets because we're cute like that:
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:
rsp=valueβ Configure the Off-core Response bits. And ooh girl, there are so many of these, buckle up:REQ_DMND_DATA_RDβ Counts the number of demand and DCU prefetch data reads of full and partial cachelines as well as 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 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.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.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, she doesn't double-count π)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. So like, you get everything unless you specifically gate it β¨
β Event Specifiers (Programmable PMCs) β
Ivy Bridge programmable PMCs support the following events β this is the long part bestie, but we're getting through all of them fr fr:
LD_BLOCKS.STORE_FORWARDβ (Event03H, Umask02H) loads blocked by overlapping with store buffer that cannot be forwarded .MISALIGN_MEM_REF.LOADSβ (Event05H, Umask01H) Speculative cache-line split load uops dispatched to L1D.MISALIGN_MEM_REF.STORESβ (Event05H, Umask02H) Speculative cache-line split Store-address uops dispatched to L1D.LD_BLOCKS_PARTIAL.ADDRESS_ALIASβ (Event07H, Umask01H) False dependencies in MOB due to partial compare on address.DTLB_LOAD_MISSES.DEMAND_LD_MISS_CAUSES_A_WALKβ (Event08H, Umask81H) Misses in all TLB levels that cause a page walk of any page size from demand loads.DTLB_LOAD_MISSES.DEMAND_LD_WALK_COMPLETEDβ (Event08H, Umask82H) Misses in all TLB levels that caused page walk completed of any size by demand loads.DTLB_LOAD_MISSES.DEMAND_LD_WALK_DURATIONβ (Event08H, Umask84H) Cycle PMH is busy with a walk due to demand loads.UOPS_ISSUED.ANYβ (Event0EH, Umask01H) Increments each cycle the # of Uops issued by the RAT to RS. Set Cmask = 1, Inv = 1to count stalled cycles. Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles of this core.UOPS_ISSUED.FLAGS_MERGEβ (Event0EH, Umask10H) Number of flags-merge uops allocated. Such uops adds delay.UOPS_ISSUED.SLOW_LEAβ (Event0EH, Umask20H) 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β (Event0EH, Umask40H) Number of multiply packed/scalar single precision uops allocated.ARITH.FPU_DIV_ACTIVEβ (Event14H, Umask01H) 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β (Event24H, Umask01H) Demand Data Read requests that hit L2 cache.L2_RQSTS.ALL_DEMAND_DATA_RDβ (Event24H, Umask03H) Counts any demand and L1 HW prefetch data load requests to L2.L2_RQSTS.RFO_HITSβ (Event24H, Umask04H) Counts the number of store RFO requests that hit the L2 cache.L2_RQSTS.RFO_MISSβ (Event24H, Umask08H) Counts the number of store RFO requests that miss the L2 cache.L2_RQSTS.ALL_RFOβ (Event24H, Umask0CH) Counts all L2 store RFO requests.L2_RQSTS.CODE_RD_HITβ (Event24H, Umask10H) Number of instruction fetches that hit the L2 cache.L2_RQSTS.CODE_RD_MISSβ (Event24H, Umask20H) Number of instruction fetches that missed the L2 cache.L2_RQSTS.ALL_CODE_RDβ (Event24H, Umask30H) Counts all L2 code requests.L2_RQSTS.PF_HITβ (Event24H, Umask40H) Counts all L2 HW prefetcher requests that hit L2.L2_RQSTS.PF_MISSβ (Event24H, Umask80H) Counts all L2 HW prefetcher requests that missed L2.L2_RQSTS.ALL_PFβ (Event24H, UmaskC0H) Counts all L2 HW prefetcher requests.L2_STORE_LOCK_RQSTS.MISSβ (Event27H, Umask01H) RFOs that miss cache lines.L2_STORE_LOCK_RQSTS.HIT_Mβ (Event27H, Umask08H) RFOs that hit cache lines in M state.L2_STORE_LOCK_RQSTS.ALLβ (Event27H, Umask0FH) RFOs that access cache lines in any state.L2_L1D_WB_RQSTS.MISSβ (Event28H, Umask01H) Not rejected writebacks that missed LLC.L2_L1D_WB_RQSTS.HIT_Eβ (Event28H, Umask04H) Not rejected writebacks from L1D to L2 cache lines in E state.L2_L1D_WB_RQSTS.HIT_Mβ (Event28H, Umask08H) Not rejected writebacks from L1D to L2 cache lines in M state.L2_L1D_WB_RQSTS.ALLβ (Event28H, Umask0FH) Not rejected writebacks from L1D to L2 cache lines in any state.
Ok we're not done yet β there's more of this page coming, so don't go anywhere bestie π
LONGEST_LAT_CACHE.REFERENCE
(Event 2EH, Umask 4FH) β counts the requests coming from the core that reference a cache line in the last level cache π literally the core looking at LLC and going "hey, you".
LONGEST_LAT_CACHE.MISS
(Event 2EH, Umask 41H) β counts every single cache miss condition for references to the last level cache π oof, the LLC said no.
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 this is counting cycles, not seconds, periodt.
CPU_CLK_THREAD_UNHALTED.REF_XCLK
(Event 3CH, Umask 01H) β increments at the frequency of XCLK (100 MHz) while not halted β°.
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 π (yes it really says Cmaks in the source, we don't fix, we report).
DTLB_STORE_MISSES.MISS_CAUSES_A_WALK
(Event 49H, Umask 01H) β a miss in all TLB levels that causes a page walk of any page size (4K/2M/4M/1G) πΆββοΈ.
DTLB_STORE_MISSES.WALK_COMPLETED
(Event 49H, Umask 02H) β a miss in all TLB levels that causes a page walk that completes, of any page size (4K/2M/4M/1G) β¨ she finished the walk, we love a finisher.
DTLB_STORE_MISSES.WALK_DURATION
(Event 49H, Umask 04H) β cycles PMH is busy with this walk π
busy busy.
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 π― close enough, no walk needed.
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 π¦.
L1D.REPLACEMENT
(Event 51H, Umask 01H) β counts the number of lines brought into the L1 data cache π new lines moving in, so iconic.
MOVE_ELIMINATION.INT_NOT_ELIMINATED
(Event 58H, Umask 01H) β number of integer Move Elimination candidate uops that were not eliminated π the elimination did not eliminate, it's giving irony.
MOVE_ELIMINATION.SIMD_NOT_ELIMINATED
(Event 58H, Umask 02H) β number of SIMD Move Elimination candidate uops that were not eliminated π.
MOVE_ELIMINATION.INT_ELIMINATED
(Event 58H, Umask 04H) β number of integer Move Elimination candidate uops that were eliminated π slay, gone, never seen again.
MOVE_ELIMINATION.SIMD_ELIMINATED
(Event 58H, Umask 08H) β 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 π kernel mode main character energy. Use Edge to count transition.
CPL_CYCLES.RING123
(Event 5CH, Umask 02H) β unhalted core cycles when the thread is not in ring 0 π userspace era.
RS_EVENTS.EMPTY_CYCLES
(Event 5EH, Umask 01H) β cycles the RS is empty for the thread π«₯ nothing in the reservation station, ghost town.
DTLB_LOAD_MISSES.STLB_HIT
(Event 5FH, Umask 04H) β counts load operations that missed 1st level DTLB but hit the 2nd level π second time's the charm.
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 β.
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 levels locked, it's giving chaos.
LOCK_CYCLES.CACHE_LOCK_DURATION
(Event 63H, Umask 02H) β cycles in which the L1D is locked π just the one level this time.
IDQ.EMPTY
(Event 79H, Umask 02H) β counts cycles the IDQ is empty π nothing to do, the queue is on break.
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 π.
IDQ.ALL_DSB_CYCLES_ANY_UOPS
(Event 79H, Umask 18H) β counts cycles DSB is delivered at least one uops. Set Cmask = 1 π
.
IDQ.ALL_DSB_CYCLES_4_UOPS
(Event 79H, Umask 18H) β counts cycles DSB is delivered four uops. Set Cmask = 4 π.
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 π£οΈ all roads lead to IDQ.
ICACHE.MISSES
(Event 80H, Umask 02H) β number of Instruction Cache, Streaming Buffer and Victim Cache Misses. Includes UC accesses π it's a whole trio of misses bestie.
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 π we love to see it.
ILD_STALL.LCP
(Event 87H, Umask 01H) β stalls caused by changing prefix length of the instruction π΅βπ« the prefix changed and everything stopped.
ILD_STALL.IQ_FULL
(Event 87H, Umask 04H) β stall cycles due to IQ is full π΅ no room, no vibes.
BR_INST_EXEC.NONTAKEN_COND
(Event 88H, Umask 41H) β counts conditional near branch instructions that were executed (but not necessarily retired) and not taken π
ββοΈ.
BR_INST_EXEC.TAKEN_COND
(Event 88H, Umask 81H) β counts conditional near branch instructions that were executed (but not necessarily retired) and taken β
.
BR_INST_EXEC.DIRECT_JMP
(Event 88H, Umask 82H) β counts all unconditional near branch instructions excluding calls and indirect branches π¦.
BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET
(Event 88H, Umask 84H) β counts executed indirect near branch instructions that are not calls nor returns π.
BR_INST_EXEC.RETURN_NEAR
(Event 88H, Umask 88H) β counts indirect near branches that have a return mnemonic π coming back home.
BR_INST_EXEC.DIRECT_NEAR_CALL
(Event 88H, Umask 90H) β counts unconditional near call branch instructions, excluding non call branch, executed π.
BR_INST_EXEC.INDIRECT_NEAR_CALL
(Event 88H, Umask A0H) β counts 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 gang.
BR_MISP_EXEC.NONTAKEN_COND
(Event 89H, Umask 41H) β counts conditional near branch instructions mispredicted as nontaken π¬ the predictor guessed wrong.
BR_MISP_EXEC.TAKEN_COND
(Event 89H, Umask 81H) β counts conditional near branch instructions mispredicted as taken π also wrong, different direction.
BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET
(Event 89H, Umask 84H) β counts mispredicted indirect near branch instructions that are not calls nor returns π.
BR_MISP_EXEC.RETURN_NEAR
(Event 89H, Umask 88H) β counts mispredicted indirect near branches that have a return mnemonic π the return got predicted wrong, embarrassing.
BR_MISP_EXEC.DIRECT_NEAR_CALL
(Event 89H, Umask 90H) β counts mispredicted unconditional near call branch instructions, excluding non call branch, executed π« .
BR_MISP_EXEC.INDIRECT_NEAR_CALL
(Event 89H, Umask A0H) β counts 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) π₯ every wrong guess in one number, iconic.
IDQ_UOPS_NOT_DELIVERED.CORE
(Event 9CH, Umask 01H) β counts 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 π€οΈ the whole port, no filter.
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 π€οΈ.
RESOURCE_STALLS.ANY
(Event A2H, Umask 01H) β cycles Allocation is stalled due to a Resource Related reason π§ anything resource-y counts here.
RESOURCE_STALLS.RS
(Event A2H, Umask 04H) β cycles stalled due to no eligible RS entry available π the RS had nothing for you bestie.
RESOURCE_STALLS.SBβEvent A2H,Umask 08Hβ cycles stalled because there were literally no store buffers available (and no, that does not include draining form sync) πRESOURCE_STALLS.ROBβEvent A2H,Umask 08H... wait no bestie, it'sUmask 10Hβ cycles stalled because the re-order buffer was full π«CYCLE_ACTIVITY.CYCLES_L2_PENDINGβEvent A3H,Umask 01Hβ cycles with pending L2 miss loads. SetAnyThreadto count per core βCYCLE_ACTIVITY.CYCLES_LDM_PENDINGβEvent A3H,Umask 02Hβ cycles with pending memory loads. Also setAnyThreadto count per core πCYCLE_ACTIVITY.CYCLES_NO_EXECUTEβEvent A3H,Umask 04Hβ cycles of dispatch stalls. Again:AnyThreadfor per-core counting πCYCLE_ACTIVITY.CYCLES_L1D_PENDINGβEvent A3H,Umask 08Hβ cycles with pending L1 cache miss loads. You already know the drill:AnyThread= per core β¨DSB2MITE_SWITCHES.COUNTβEvent ABH,Umask 01Hβ how many DSB to MITE switches happened πDSB2MITE_SWITCHES.PENALTY_CYCLESβEvent ABH,Umask 02Hβ cycles of delay caused by those DSB to MITE switches πDSB_FILL.EXCEED_DSB_LINESβEvent ACH,Umask 08Hβ a DSB Fill that ran into more than 3 DSB lines π¦ITLB.ITLB_FLUSHβEvent AEH,Umask 01Hβ counts ITLB flushes, and yes it includes 4k/2M/4M pages π§OFFCORE_REQUESTS.DEMAND_DATA_RDβEvent B0H,Umask 01Hβ demand data read requests that got sent to uncore π¨OFFCORE_REQUESTS.DEMAND_CODE_RDβEvent B0H,Umask 02Hβ demand code read requests sent to uncore π¬OFFCORE_REQUESTS.DEMAND_RFOβEvent B0H,Umask 04Hβ demand RFO read requests sent to uncore, and it includes regular RFOs, locks, and ItoM π₯OFFCORE_REQUESTS.ALL_DATA_RDβEvent B0H,Umask 08Hβ data read requests sent to uncore, both demand and prefetch πUOPS_EXECUTED.THREADβEvent B1H,Umask 01Hβ counts the total number of uops to be executed per-thread each cycle. SetCmask = 1,INV = 1to 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 setANYπOFF_CORE_RESPONSE_0βEvent B7H,Umask 01Hβ Off-core Response Performance Monitoring.PMC0only, and it requires programming MSR01A6Hβ οΈOFF_CORE_RESPONSE_1βEvent BBH,Umask 01Hβ Off-core Response Performance Monitoring.PMC3only, and this one requires programming MSR01A7Hβ οΈTLB_FLUSH.DTLB_THREADβEvent BDH,Umask 01Hβ DTLB flush attempts of the thread-specific entries πΈTLB_FLUSH.STLB_ANYβEvent BDH,Umask 20Hβ counts 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β a precise instruction retired event with HW to reduce the effect of PEBS shadow in IP distribution.PMC1only, and you must quiesce other PMCs πOTHER_ASSISTS.AVX_STOREβEvent C1H,Umask 08Hβ number of assists tied to 256-bit AVX store operations πΎOTHER_ASSISTS.AVX_TO_SSEβEvent C1H,Umask 10Hβ number of transitions from AVX-256 to legacy SSE when the penalty applies π¬OTHER_ASSISTS.SSE_TO_AVXβEvent C1H,Umask 20Hβ number of transitions from SSE to AVX-256 when the penalty applies π¬UOPS_RETIRED.ALLβEvent C2H,Umask 01Hβ counts the number of micro-ops retired. Usecmask=1and invert to count active cycles or stalled cycles. Supports PEBS, and useAny=1for core granularity β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, different umask β that's not a typo, that's the vibe) π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 the cases of saving new LBR records by hardware πΌMEM_TRANS_RETIRED.LOAD_LATENCYβEvent CDH,Umask 01Hβ sample loads with a specified latency threshold.PMC3only, and you specify the threshold in MSR0x3F6β±οΈMEM_TRANS_RETIRED.PRECISE_STOREβEvent CDH,Umask 02Hβ sample stores and collect precise store operation via PEBS record.PMC3only π¦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 got split across a cache line βοΈMEM_UOPS_RETIRED.SPLIT_STORESβEvent D0H,Umask 42Hβ count retired store uops that got 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 whose data source was an LLC hit with no snoop required πMEM_LOAD_UOPS_RETIRED.LLC_MISSβEvent D1H,Umask 20Hβ retired load uops whose data source is an LLC miss πMEM_LOAD_UOPS_RETIRED.HIT_LFBβEvent D1H,Umask 40Hβ retired load uops whose 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 whose 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 whose 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 whose data sources were HitM responses from shared LLC π€MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONEβEvent D2H,Umask 08Hβ retired load uops whose data sources were hits in LLC without snoops required πMEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAMβEvent D3H,Umask 01Hβ retired load uops whose data sources missed LLC but were serviced from local dram. Supports PEBS βMEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAMβEvent D3H,Umask 04Hβ retired load uops whose data source was remote DRAM πMEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_HITMβEvent D3H,Umask 10Hβ retired load uops whose data source was remote HITM π‘MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_FWDβEvent D3H,Umask 20Hβ retired load uops whose data source was forwards from a remote cache πBACLEARS.ANYβEvent E6H,Umask 1FHβ number of front end re-steers due to BPU misprediction π’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. Heads up: counting does not cover rejects π βοΈ
okay bestie that's a whole lot of counters but we're not even done yet β keep scrolling, there's more π
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. πL2_LINES_OUT.DIRTY_ALLβ (Event F2H, Umask 0AH) Dirty L2 cache lines filling the L2. π₯
π SEE ALSO π
okay bestie, here's the whole squad, all of them linked and none of them skipped π
pmc(3), pmc.amd(3), pmc.atom(3), pmc.core(3), pmc.corei7(3), pmc.corei7uc(3), pmc.iaf(3), pmc.ivybridge(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. like, it's been iconic since day one, no cap π«Ά
π AUTHORS π
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. π«
The support for the Ivy Bridge Xeon microarchitecture was written by Hiren Panchasara <hiren.panchasara@gmail.com>. πΈ
and that's a wrap on PMC.IVYBRIDGEXEON(3) bestie, go count some cache lines and slay π
β¨
Debian Β· January 25, 2013 Β· PMC.IVYBRIDGEXEON(3) π¦
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2013 Hiren Panchasara <hiren.panchasara@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms