2005-04-19 04:01:25 +00:00
|
|
|
.\" Copyright (c) 2003 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.
|
|
|
|
.\"
|
|
|
|
.\" This software is provided by Joseph Koshy ``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 Joseph Koshy 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.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2005-06-24 16:19:46 +00:00
|
|
|
.Dd December 15, 2003
|
2005-04-19 04:01:25 +00:00
|
|
|
.Os
|
|
|
|
.Dt PMCCONTROL 8
|
|
|
|
.Sh NAME
|
|
|
|
.Nm pmccontrol
|
2005-06-24 16:19:46 +00:00
|
|
|
.Nd "control hardware performance monitoring counters"
|
2005-04-19 04:01:25 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2005-06-24 16:19:46 +00:00
|
|
|
.Oo Fl c Ar cpu | Fl d Ar pmc | Fl e Ar pmc Oc ...
|
2005-04-19 04:01:25 +00:00
|
|
|
.Nm
|
2005-06-24 16:19:46 +00:00
|
|
|
.Fl l
|
2005-04-19 04:01:25 +00:00
|
|
|
.Nm
|
2005-06-24 16:19:46 +00:00
|
|
|
.Fl L
|
|
|
|
.Nm
|
|
|
|
.Fl s
|
2005-04-19 04:01:25 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility controls the operation of the system's hardware performance
|
|
|
|
monitoring counters.
|
|
|
|
.Sh OPTIONS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility processes options in command line order, so later options modify
|
|
|
|
the effect of earlier ones.
|
|
|
|
The following options are available:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl c Ar cpu
|
|
|
|
Subsequent enable and disable options affect the CPU
|
|
|
|
denoted by
|
|
|
|
.Ar cpu .
|
|
|
|
The argument
|
|
|
|
.Ar cpu
|
|
|
|
is either a number denoting a CPU number in the system, or the string
|
2005-06-24 16:19:46 +00:00
|
|
|
.Dq Li * ,
|
2005-04-19 04:01:25 +00:00
|
|
|
denoting all CPUs in the system.
|
|
|
|
.It Fl d Ar pmc
|
|
|
|
Disable PMC number
|
|
|
|
.Ar pmc
|
|
|
|
on the CPU specified by
|
|
|
|
.Fl c ,
|
|
|
|
preventing it from being used till subsequently re-enabled.
|
|
|
|
The argument
|
|
|
|
.Ar pmc
|
|
|
|
is either a number denoting a specified PMC, or the string
|
2005-06-24 16:19:46 +00:00
|
|
|
.Dq Li *
|
2005-04-19 04:01:25 +00:00
|
|
|
denoting all the PMCs on the specified CPU.
|
|
|
|
.Pp
|
|
|
|
Only idle PMCs may be disabled.
|
|
|
|
.\" XXX this probably needs to be fixed.
|
|
|
|
.It Fl e Ar pmc
|
|
|
|
Enable PMC number
|
|
|
|
.Ar pmc ,
|
|
|
|
on the CPU specified by
|
|
|
|
.Fl c ,
|
|
|
|
allowing it to be used in the future.
|
|
|
|
The argument
|
|
|
|
.Ar pmc
|
|
|
|
is either a number denoting a specified PMC, or the string
|
2005-06-24 16:19:46 +00:00
|
|
|
.Dq Li *
|
2005-04-19 04:01:25 +00:00
|
|
|
denoting all the PMCs on the specified CPU.
|
|
|
|
If PMC
|
|
|
|
.Ar pmc
|
|
|
|
is already enabled, this option has no effect.
|
|
|
|
.It Fl l
|
|
|
|
List available hardware performance counters and their current
|
|
|
|
disposition.
|
|
|
|
.It Fl L
|
|
|
|
List available hardware performance counter classes and their
|
|
|
|
supported event names.
|
|
|
|
.It Fl s
|
|
|
|
Print driver statistics maintained by
|
|
|
|
.Xr hwpmc 4 .
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
To disable all PMCs on all CPUs, use the command:
|
2005-06-24 16:19:46 +00:00
|
|
|
.Dl "pmccontrol -d*"
|
2005-04-19 04:01:25 +00:00
|
|
|
.Pp
|
|
|
|
To enable all PMCs on all CPUs, use:
|
2005-06-24 16:19:46 +00:00
|
|
|
.Dl "pmccontrol -e*"
|
2005-04-19 04:01:25 +00:00
|
|
|
.Pp
|
|
|
|
To disable PMCs 0 and 1 on CPU 2, use:
|
2005-06-24 16:19:46 +00:00
|
|
|
.Dl "pmccontrol -c2 -d0 -d1"
|
2005-04-19 04:01:25 +00:00
|
|
|
.Pp
|
|
|
|
To disable PMC 0 of CPU 0 only, and enable all other PMCS on all other
|
|
|
|
CPUs, use:
|
2005-06-24 16:19:46 +00:00
|
|
|
.Dl "pmccontrol -c* -e* -c0 -d0"
|
2005-04-19 04:01:25 +00:00
|
|
|
.Sh DIAGNOSTICS
|
2005-06-24 16:19:46 +00:00
|
|
|
.Ex -std
|
2005-04-19 04:01:25 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr pmc 3 ,
|
2005-06-24 16:19:46 +00:00
|
|
|
.Xr pmclog 3 ,
|
2005-04-19 04:01:25 +00:00
|
|
|
.Xr hwpmc 4 ,
|
|
|
|
.Xr pmcstat 8 ,
|
|
|
|
.Xr sysctl 8
|
2005-06-24 16:19:46 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility first appeared in
|
|
|
|
.Fx 6.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Joseph Koshy Aq jkoshy@FreeBSD.org
|