PMC.SOFT(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… 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 β€” No
  • PMC_CAP_INTERRUPT β€” Yes ⭐
  • PMC_CAP_INVERT β€” No
  • PMC_CAP_READ β€” Yes ⭐
  • PMC_CAP_PRECISE β€” No
  • PMC_CAP_SYSTEM β€” Yes ⭐
  • PMC_CAP_TAGGING β€” No
  • PMC_CAP_THRESHOLD β€” No
  • PMC_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 returned FILTER_HANDLED. it handled it, queen πŸ‘‘
  • INTR.ITHREAD β€” interrupt filter returned FILTER_SCHEDULE_ITHREAD. scheduling an ithread, main character energy 🌟
  • INTR.SCHEDULE β€” ithread scheduled. it's on the calendar bestie πŸ“…
  • INTR.STRAY β€” interrupt filter returned FILTER_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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms