]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - lib/libpmc/pmc.tsc.3
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / lib / libpmc / pmc.tsc.3
1 .\" Copyright (c) 2003-2008 Joseph Koshy.  All rights reserved.
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
5 .\" are met:
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\"    notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\"    notice, this list of conditions and the following disclaimer in the
10 .\"    documentation and/or other materials provided with the distribution.
11 .\"
12 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22 .\" SUCH DAMAGE.
23 .\"
24 .\" $FreeBSD$
25 .\"
26 .Dd October 4, 2008
27 .Dt PMC.TSC 3
28 .Os
29 .Sh NAME
30 .Nm pmc.tsc
31 .Nd measurements using the i386 timestamp counter
32 .Sh LIBRARY
33 .Lb libpmc
34 .Sh SYNOPSIS
35 .In pmc.h
36 .Sh DESCRIPTION
37 In the i386 architecture, the timestamp counter is a monotonically
38 non-decreasing counter that counts processor cycles.
39 .Pp
40 This counter may be selected specifying an event specifier
41 .Dq Li tsc
42 to
43 .Xr pmc_allocate 3 .
44 The TSC is a read-only counter that may only be allocated in
45 system-wide counting mode.
46 The
47 .Dq Li tsc
48 event does not support further event qualifiers.
49 .Pp
50 Multiple processes are allowed to allocate the TSC.
51 Once allocated, the TSC may be read using the
52 .Fn pmc_read
53 function, or by using the
54 .Li RDTSC
55 instruction.
56 .Ss Event Name Aliases
57 The alias
58 .Dq Li cycles
59 maps to the TSC.
60 .Sh SEE ALSO
61 .Xr pmc 3 ,
62 .Xr pmc.atom 3 ,
63 .Xr pmc.core 3 ,
64 .Xr pmc.core2 3 ,
65 .Xr pmc.iaf 3 ,
66 .Xr pmc.k7 3 ,
67 .Xr pmc.k8 3 ,
68 .Xr pmc.p4 3 ,
69 .Xr pmc.p5 3 ,
70 .Xr pmc.p6 3 ,
71 .Xr pmc.soft 3 ,
72 .Xr pmclog 3 ,
73 .Xr hwpmc 4
74 .Sh HISTORY
75 The
76 .Nm pmc
77 library first appeared in
78 .Fx 6.0 .
79 .Sh AUTHORS
80 The
81 .Lb libpmc
82 library was written by
83 .An "Joseph Koshy"
84 .Aq jkoshy@FreeBSD.org .