Port details |
- libcpucycles Microlibrary for counting CPU cycles
- 20250925 benchmarks
=0 20240318_2Version of this port present on the latest quarterly branch. - Maintainer: fuz@FreeBSD.org
 - Port Added: 2024-10-30 09:03:18
- Last Update: 2025-09-28 09:29:34
- Commit Hash: 7f47d88
- Also Listed In: devel
- License: PD
- WWW:
- https://cpucycles.cr.yp.to/
- Description:
- libcpucycles is a microlibrary for counting CPU cycles. Cycle counts
are not as detailed as Falk diagrams but are the most precise timers
available to typical software; they are central tools used in
understanding and improving software performance.
The libcpucycles API is simple: include <cpucycles.h>, call cpucycles()
to receive a long long whenever desired, and link with -lcpucycles.
Internally, libcpucycles understands machine-level cycle counters for
amd64 (both PMC and TSC), arm32, arm64 (both PMC and VCT), mips64,
ppc32, ppc64, riscv32, riscv64, s390x, sparc64, and x86. libcpucycles
also understands four OS-level mechanisms, which give varying levels of
accuracy: mach_absolute_time, perf_event, CLOCK_MONOTONIC, and, as a
fallback, microsecond-resolution gettimeofday.
When the program first calls cpucycles(), libcpucycles automatically
benchmarks the available mechanisms and selects the mechanism that does
the best job. Subsequent cpucycles() calls are thread-safe and very
fast. An accompanying cpucycles-info program prints a summary of
cycle-counter accuracy.
¦ ¦ ¦ ¦ 
- Manual pages:
-
- pkg-plist: as obtained via:
make generate-plist - USE_RC_SUBR (Service Scripts)
- no SUBR information found for this port
- Dependency lines:
-
- libcpucycles>0:benchmarks/libcpucycles
- To install the port:
- cd /usr/ports/benchmarks/libcpucycles/ && make install clean
- To add the package, run one of these commands:
- pkg install benchmarks/libcpucycles
- pkg install libcpucycles
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.- PKGNAME: libcpucycles
- Flavors: there is no flavor information for this port.
- distinfo:
- TIMESTAMP = 1758883194
SHA256 (libcpucycles-20250925.tar.gz) = 62313d42ad5a3cbd8d41a9fb7088edc328ef499d426e1f191612331d0fcbe301
SIZE (libcpucycles-20250925.tar.gz) = 48447
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- python3.11 : lang/python311
- There are no ports dependent upon this port
Configuration Options:
- No options to configure
- Options name:
- benchmarks_libcpucycles
- USES:
- python:build shebangfix
- FreshPorts was unable to extract/find any pkg message
- Master Sites:
|
Number of commits found: 4
Commit History - (may be incomplete: for full details, see links to repositories near top of page) |
Commit | Credits | Log message |
20250925 28 Sep 2025 09:29:34
    |
Robert Clausecker (fuz)  |
benchmarks/libcpucycles: update to 20250925
Changelog: https://cpucycles.cr.yp.to/download.html
Event: EuroBSDcon 2025 |
20240318_2 25 Nov 2024 10:22:04
    |
Robert Clausecker (fuz)  |
benchmarks/libcpucycles: report actual CPU frequency if supported
This uses sched_getcpu(2) to find the CPU we are scheduled on and then
cpufreq(4) to find the frequency of that CPU. The caller is responsible
for pinning the thread to one CPU and/or disabling frequency scaling if
a consistent result is required. |
20240318_1 06 Nov 2024 15:14:31
    |
Robert Clausecker (fuz)  |
benchmarks/libcpucycles: fix jmpbuf / sigjmpbuf confusion
I forgot to include this patch originally. While the warning is
harmless (sigjmp_buf and jmp_buf have the same layout on FreeBSD),
it might not be on downstream ports consumers like DragonflyBSD. |
20240318 30 Oct 2024 09:00:37
    |
Robert Clausecker (fuz)  |
benchmarks/libcpucycles: Microlibrary for counting CPU cycles
libcpucycles is a microlibrary for counting CPU cycles. Cycle counts
are not as detailed as Falk diagrams but are the most precise timers
available to typical software; they are central tools used in
understanding and improving software performance.
The libcpucycles API is simple: include <cpucycles.h>, call cpucycles()
to receive a long long whenever desired, and link with -lcpucycles.
Internally, libcpucycles understands machine-level cycle counters for
amd64 (both PMC and TSC), arm32, arm64 (both PMC and VCT), mips64,
ppc32, ppc64, riscv32, riscv64, s390x, sparc64, and x86. libcpucycles
also understands four OS-level mechanisms, which give varying levels of
accuracy: mach_absolute_time, perf_event, CLOCK_MONOTONIC, and, as a (Only the first 15 lines of the commit message are shown above ) |
Number of commits found: 4
|