2008-09-16 16:29:41 +00:00
|
|
|
.\" Copyright (c) 2003-2008 Joseph Koshy. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
2012-02-17 11:09:51 +00:00
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
2008-09-16 16:29:41 +00:00
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2008-10-04 12:44:05 +00:00
|
|
|
.Dd October 4, 2008
|
2008-09-16 16:29:41 +00:00
|
|
|
.Dt PMC.TSC 3
|
2010-04-14 19:08:06 +00:00
|
|
|
.Os
|
2008-09-16 16:29:41 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm pmc.tsc
|
|
|
|
.Nd measurements using the i386 timestamp counter
|
|
|
|
.Sh LIBRARY
|
|
|
|
.Lb libpmc
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.In pmc.h
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
In the i386 architecture, the timestamp counter is a monotonically
|
|
|
|
non-decreasing counter that counts processor cycles.
|
|
|
|
.Pp
|
|
|
|
This counter may be selected specifying an event specifier
|
|
|
|
.Dq Li tsc
|
|
|
|
to
|
|
|
|
.Xr pmc_allocate 3 .
|
|
|
|
The TSC is a read-only counter that may only be allocated in
|
|
|
|
system-wide counting mode.
|
|
|
|
The
|
|
|
|
.Dq Li tsc
|
|
|
|
event does not support further event qualifiers.
|
|
|
|
.Pp
|
|
|
|
Multiple processes are allowed to allocate the TSC.
|
|
|
|
Once allocated, the TSC may be read using the
|
|
|
|
.Fn pmc_read
|
|
|
|
function, or by using the
|
|
|
|
.Li RDTSC
|
|
|
|
instruction.
|
|
|
|
.Ss Event Name Aliases
|
|
|
|
The alias
|
|
|
|
.Dq Li cycles
|
|
|
|
maps to the TSC.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr pmc 3 ,
|
2008-10-04 12:44:05 +00:00
|
|
|
.Xr pmc.atom 3 ,
|
|
|
|
.Xr pmc.core 3 ,
|
|
|
|
.Xr pmc.core2 3 ,
|
|
|
|
.Xr pmc.iaf 3 ,
|
2008-09-16 16:29:41 +00:00
|
|
|
.Xr pmc.k7 3 ,
|
|
|
|
.Xr pmc.k8 3 ,
|
2012-03-28 20:58:30 +00:00
|
|
|
.Xr pmc.soft 3 ,
|
2008-09-16 16:29:41 +00:00
|
|
|
.Xr pmclog 3 ,
|
|
|
|
.Xr hwpmc 4
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm pmc
|
|
|
|
library first appeared in
|
|
|
|
.Fx 6.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
The
|
|
|
|
.Lb libpmc
|
|
|
|
library was written by
|
2014-06-23 08:23:05 +00:00
|
|
|
.An Joseph Koshy Aq Mt jkoshy@FreeBSD.org .
|