std1.0.0-beta-7 SafeC docs

Module debug::perf

#include <std/debug/perf.h> source

Performance Counters Hardware performance counter access (x86-64 RDTSC, AArch64 PMCCNTR, RISC-V cycle). Freestanding-safe.

Structs

PerfCounter

Functions

perf_read_cycleRead the raw cycle counter for the current arch.
perf_read_nsRead timestamp in nanoseconds (best-effort; returns 0 in freestanding without freq).

Macros

PERF_BEGIN
PERF_END