---
name: "pmc.tsc"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/pmc.tsc"
---

# pmc.tsc(3)

measurements using the i386 timestamp counter

## NAME

**pmc.tsc** – measurements using the i386 timestamp counter

## LIBRARY

library “libpmc”

## SYNOPSIS

**#include \<pmc.h\>**

## DESCRIPTION

In the i386 architecture, the timestamp counter is a monotonically non-decreasing counter that counts processor cycles.

This counter may be selected specifying an event specifier “tsc” to [pmc\_allocate(3)](/pmc_allocate/3.md). 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.

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.

### Event Name Aliases

The alias “cycles” maps to the TSC.

## SEE ALSO

[pmc(3)](/pmc/3.md), [pmc.amd(3)](/pmc.amd/3.md), [pmc.atom(3)](/pmc.atom/3.md), [pmc.core(3)](/pmc.core/3.md), [pmc.core2(3)](/pmc.core2/3.md), [pmc.iaf(3)](/pmc.iaf/3.md), [pmc.ibs(3)](/pmc.ibs/3.md), [pmc.soft(3)](/pmc.soft/3.md), [pmclog(3)](/pmclog/3.md), [hwpmc(4)](/hwpmc/4.md)

## HISTORY

The **pmc** library first appeared in FreeBSD 6.0.

## AUTHORS

The library “libpmc” library was written by Joseph Koshy ⟨*jkoshy@FreeBSD.org*⟩.
