*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> get_cyclecount (9)              
Title
Content
Arch
Section
 

GET_CYCLECOUNT(9)

Contents


NAME    [Toc]    [Back]

     get_cyclecount -- get the CPU's fast counter register contents

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/systm.h>
     #include <machine/cpu.h>

     u_int64_t
     get_cyclecount(void);

DESCRIPTION    [Toc]    [Back]

     The get_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 80386 and 80486) do not have such a register, so
     get_cyclecount() on these platforms returns the number of nanoseconds
     represented by the structure returned by nanotime(9).

     The Pentium processors all use the TSC register.

     The Alpha processors use the PCC register.

     The IA64 processors use the AR.ITC register.

SEE ALSO    [Toc]    [Back]

      
      
     nanotime(9)

HISTORY    [Toc]    [Back]

     The get_cyclecount() function first appeared in FreeBSD 5.0.

AUTHORS    [Toc]    [Back]

     This manual page was written by Mark Murray <[email protected]>.


FreeBSD 5.2.1		       November 20, 2000		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
rtc IRIX Returns clock register contents
DtEditorReplaceFromFile HP-UX replace a portion of the contents of a DtEditor widget with the contents of a file
tttk_block_while HP-UX block while a counter is greater than zero
evcnt_attach_dynamic NetBSD generic event counter framework
evcnt NetBSD generic event counter framework
evcnt_detach NetBSD generic event counter framework
evcnt_attach_static NetBSD generic event counter framework
glxgetvideosyncsgi IRIX obtain value of vertical retrace counter
ecstats IRIX report global event counter activity
pfm Tru64 The on-chip performance counter pseudo-device
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service