PMC.TSC(3)

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

πŸ’– NAME πŸ’–

pmc.tsc β€” measurements using the i386 timestamp counter.

From the Library Functions Manual, page tag PMC.TSC(3). Bestie, this page is short, iconic, and all about reading the timestamp counter without losing your mind. πŸ¦‹

πŸ“š LIBRARY πŸ“š

Performance Counters Library (libpmc, -lpmc) β€” yes, that's the library vibe. πŸ’…

✨ SYNOPSIS ✨

#include <pmc.h>

🌸 DESCRIPTION 🌸

Okay so in the i386 architecture, the timestamp counter is a monotonically non-decreasing counter that counts processor cycles. Slay. ⏱️

You can select this counter by specifying the event specifier tsc to pmc_allocate(3). The TSC is a read-only counter that may only be allocated in system-wide counting mode. The tsc event does not support further event qualifiers. No extras, no add-ons, periodt. πŸ™…β€β™€οΈ

Multiple processes are allowed to allocate the TSC. Once allocated, the TSC may be read using the pmc_read() function, or by using the RDTSC instruction. Two paths, same timestamp-counter destiny. ⭐

πŸŒ€ Event Name Aliases πŸŒ€

The alias cycles maps to the TSC. That's it, that's the alias. πŸ’«

πŸ”— SEE ALSO πŸ”—

pmc(3), pmc.amd(3), pmc.atom(3), pmc.core(3), pmc.core2(3), pmc.iaf(3), pmc.soft(3), pmclog(3), hwpmc(4) β€” go read the friends, bestie. 🫢

πŸ•°οΈ HISTORY πŸ•°οΈ

The pmc library first appeared in FreeBSD 6.0. Vintage but still iconic. πŸ‘‘

πŸ‘‘ AUTHORS πŸ‘‘

The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. Credit where credit is due, no cap. πŸ’œ

πŸ’Œ Cute sign-off: source Debian, date October 4, 2008, and the manual tag PMC.TSC(3). That's the footer info, folded with love. 🫢
πŸ“¦ 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