pmc.tsc(3)

pmc.tsc3

Measurements using the i386 timestamp counter

Usage

#include <pmc.h>

Library

library “libpmc”

Overview

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). 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.

Releases

41 releases since FreeBSD 7.3-RELEASE; the text changed 30 times.

  1. 7.3
  2. 7.4
  3. 8.0
  4. 8.1
  5. 8.2
  6. 8.3
  7. 8.4
  8. 9.0
  9. 9.1
  10. 9.2
  11. 9.3
  12. 10.0
  13. 10.1
  14. 10.2
  15. 10.3
  16. 10.4
  17. 11.0
  18. 11.1
  19. 11.2
  20. 11.3
  21. 11.4
  22. 12.0
  23. 12.1
  24. 12.2
  25. 12.3
  26. 12.4
  27. 13.0
  28. 13.1–13.2
  29. 13.3–14.5
  30. 15.0–15.1
  31. 16.0

History

The pmc library first appeared in FreeBSD 6.0.

Authors

The library “libpmc” library was written by Joseph Koshy ⟨[email protected]⟩.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.