PMC.SOFT(3)
π PMC.SOFT(3) β bestie's guide to software events β¨
okay so this is the pmc.soft page from the Library Functions Manual, and it's genuinely iconic β it's all about getting your measurements from software based events instead of poking at actual hardware counters. no cap, it's giving "the CPU is telling on itself" energy π
πΈ LIBRARY πΈ
Performance Counters Library (libpmc, -lpmc) β yes bestie, that's the one you link with π
β¨ SYNOPSIS β¨
#include <pmc.h>
that's literally it, that's the whole vibe. one include and you're in π¦
π DESCRIPTION π
So the way this works: software events are the move when you wanna collect, like, various sources of software events. that's the whole point, fr fr. it's not about the silicon counting things β it's the kernel-side software hooks doing the counting for you π₯
π PMC Features π
There are 16 sampling counters using software events, built on various sources. These PMCs support the following capabilities:
PMC_CAP_CASCADEβ No πPMC_CAP_EDGEβ NoPMC_CAP_INTERRUPTβ Yes βPMC_CAP_INVERTβ NoPMC_CAP_READβ Yes βPMC_CAP_PRECISEβ NoPMC_CAP_SYSTEMβ Yes βPMC_CAP_TAGGINGβ NoPMC_CAP_THRESHOLDβ NoPMC_CAP_USERβ Yes βPMC_CAP_WRITEβ Yes β
so like, interrupts, reads, system, user, writes? slay. cascading, edge, invert, precise, tagging, threshold? not today bestie π
π§ Event Qualifiers π§
Heads up: there is no supported event qualifier. so don't come looking for one, she's not here π
The event specifiers supported by software are:
CLOCK.HARDβ hard clock ticks. the classic β°CLOCK.STATβ stat clock ticks. statistics o'clock π°οΈCLOCK.PROFβ profiling clock ticks. for when you wanna know where time's going πINTR.ALLβ interrupt filter executed. every single one, no filter on the filter β¨INTR.FILTERβ interrupt filter returnedFILTER_HANDLED. it handled it, queen πINTR.ITHREADβ interrupt filter returnedFILTER_SCHEDULE_ITHREAD. scheduling an ithread, main character energy πINTR.SCHEDULEβ ithread scheduled. it's on the calendar bestie πINTR.STRAYβ interrupt filter returnedFILTER_STRAY. stray interrupts, we've all been there πINTR.WAITINGβ ithread not scheduled, already active. like texting someone who's already typing πLOCK.FAILEDβ lock acquisition failed. the lock said no βPAGE_FAULT.ALLβ all page fault type. every flavor of page fault πPAGE_FAULT.READβ read page fault. reading, iconically πPAGE_FAULT.WRITEβ write page fault. writing, also iconically βοΈ
π¦ SEE ALSO π¦
like, go read these too, they're all linked 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.tsc(3), pmc.ucf(3), pmc.westmereuc(3), pmc_cpuinfo(3), pmclog(3), hwpmc(4)
π HISTORY π
The pmc library first appeared in FreeBSD 6.0. a vintage icon, honestly π
πΈ AUTHORS πΈ
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. and the Software PMC was written by Fabien Thomas <fabient@FreeBSD.org>. thank you both, kings π«Ά
π that's the whole page, bestie. no notes. periodt.
sign-off szn: this one's from Debian, dated September 23, 2021 β catch you on the next page, mwah ππ
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2012 Fabien Thomas. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms