|
NAMEget_cyclecount —
get the CPU's fast counter register contents
SYNOPSIS#include <sys/param.h>
#include <sys/systm.h>
#include <machine/cpu.h>
uint64_t
DESCRIPTIONTheget_cyclecount () function uses a register available
in most modern CPUs to return a value that is monotonically increasing inside
each CPU.
On SMP systems, there will be a number of separate monotonic sequences, one for each CPU running. The value in the SMP case is selected from one of these sequences, dependent on which CPU was scheduled to service the request. The speed and the maximum value of each counter is CPU-dependent.
Some CPUs (such as the Intel 80486) do not have such a register, so
The AMD64 and Intel 64 processors use the
SEE ALSObinuptime(9)HISTORYTheget_cyclecount () function first appeared in
FreeBSD 5.0.
AUTHORSThis manual page was written by Mark Murray <markm@FreeBSD.org>.
Visit the GSP FreeBSD Man Page Interface. |