Deleted Added
full compact
get_cyclecount.9 (88974) get_cyclecount.9 (89193)
1.\" Copyright (c) 2000 Mark R V Murray
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
1.\" Copyright (c) 2000 Mark R V Murray
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/share/man/man9/get_cyclecount.9 88974 2002-01-06 23:56:12Z davidc $
25.\" $FreeBSD: head/share/man/man9/get_cyclecount.9 89193 2002-01-10 10:48:39Z ru $
26.\"
27.Dd November 20, 2000
26.\"
27.Dd November 20, 2000
28.Dt GET_CYCLECOUNTER 9
28.Dt GET_CYCLECOUNT 9
29.Os
30.Sh NAME
31.Nm get_cyclecount
32.Nd get the CPU's fast counter register contents
33.Sh SYNOPSIS
34.In sys/param.h
35.In machine/cpufunc.h
36.In machine/cpu.h
37.Ft u_int64_t
38.Fn get_cyclecount "void"
39.Sh DESCRIPTION
40The
41.Fn get_cyclecount
29.Os
30.Sh NAME
31.Nm get_cyclecount
32.Nd get the CPU's fast counter register contents
33.Sh SYNOPSIS
34.In sys/param.h
35.In machine/cpufunc.h
36.In machine/cpu.h
37.Ft u_int64_t
38.Fn get_cyclecount "void"
39.Sh DESCRIPTION
40The
41.Fn get_cyclecount
42functon uses a register
42function uses a register
43available in most modern CPUs
44to return a value
45that is monotonically increasing
46inside each CPU.
47.Pp
43available in most modern CPUs
44to return a value
45that is monotonically increasing
46inside each CPU.
47.Pp
48In SMP systems,
48On SMP systems,
49there will be a number of
50separate monotonic sequences,
51one for each CPU running.
52The value in the SMP case is
53selected from one of these sequences,
54dependent on which CPU
55was scheduled to service the request.
56.Pp
49there will be a number of
50separate monotonic sequences,
51one for each CPU running.
52The value in the SMP case is
53selected from one of these sequences,
54dependent on which CPU
55was scheduled to service the request.
56.Pp
57The speed and maximum value
57The speed and the maximum value
58of each counter
59is CPU-dependent.
60Some CPUs
61(such as the
62.Tn Intel
6380386 and 80486)
64do not have such a register,
65so

--- 34 unchanged lines hidden ---
58of each counter
59is CPU-dependent.
60Some CPUs
61(such as the
62.Tn Intel
6380386 and 80486)
64do not have such a register,
65so

--- 34 unchanged lines hidden ---