Module Name: src Committed By: maxv Date: Sun Aug 6 08:00:40 UTC 2017
Modified Files: src/lib/libarch/i386: i386_pmc_info.2 Log Message: Deprecate. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libarch/i386/i386_pmc_info.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libarch/i386/i386_pmc_info.2 diff -u src/lib/libarch/i386/i386_pmc_info.2:1.11 src/lib/libarch/i386/i386_pmc_info.2:1.12 --- src/lib/libarch/i386/i386_pmc_info.2:1.11 Wed Apr 30 13:10:50 2008 +++ src/lib/libarch/i386/i386_pmc_info.2 Sun Aug 6 08:00:40 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: i386_pmc_info.2,v 1.11 2008/04/30 13:10:50 martin Exp $ +.\" $NetBSD: i386_pmc_info.2,v 1.12 2017/08/06 08:00:40 maxv Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 10, 2001 +.Dd August 6, 2017 .Dt I386_PMC_INFO 2 i386 .Os .Sh NAME @@ -48,110 +48,8 @@ .Ft int .Fn i386_pmc_read "struct i386_pmc_read_args *ra" .Sh DESCRIPTION -These functions provide an interface to the CPU performance counters -on the 586-class and 686-class processors. -.Pp -.Fn i386_pmc_info -will return information about the available CPU counters. -The information is returned in -.Fa ia -having the following structure: -.Bd -literal -struct i386_pmc_info_args { - int type; - int flags; -}; -.Ed -.Pp -The -.Em type -member describes the class of performance counters available. -Valid values are: -.Pp -.Bl -tag -offset indent -width PMC_INFO_HASTSC -compact -.It PMC_TYPE_NONE -No PMC support -.It PMC_TYPE_I586 -586-class CPUs -.It PMC_TYPE_I686 -686-class Intel CPUs -.It PMC_TYPE_K7 -686-class AMD CPUs -.El -.Pp -The -.Em flags -member describes additional capabilities of the processor. -Valid values are: -.Pp -.Bl -tag -offset indent -width PMC_INFO_HASTSC -compact -.It PMC_INFO_HASTSC -CPU has time-stamp counter -.El -.Pp -.Fn i386_pmc_startstop -is used to start and stop the measurement of the CPU performance counters. -The argument -.Fa ssa -has the following structure: -.Bd -literal -struct i386_pmc_startstop_args { - int counter; - uint64_t val; - uint8_t event; - uint8_t unit; - uint8_t compare; - uint8_t flags; -}; -.Ed -.Pp -The counter specified by the member -.Em counter -is started if the member -.Em flags -has PMC_SETUP_KERNEL or PMC_SETUP_USER set, otherwise the counter is -stopped. -The initial value of the counter is set to -.Em val . -Additional values for the -.Em flags -member are PMC_SETUP_EDGE and PMC_SETUP_INV. -The -.Em event -member specifies some event written to the control register. -The -.Em unit -member specifies the measurement units. -The -.Em compare -member is a mask for the counter. -.Pp -.Fn i386_pmc_read -will return information about a specific CPU counter measured during -the last measurement period determined by the calling of -.Fn i386_pmc_startstop . -The information is returned in -.Fa ra -having the following structure: -.Bd -literal -struct i386_pmc_read_args { - int counter; - uint64_t val; - uint64_t time; -}; -.Ed -.Pp -The counter to read should be specified by the -.Em counter -member. -Counters are numbered from 0 to -.Dv PMC_NCOUNTERS . -The value of the counter is returned in the -.Em val -member. -The time since epoch, measured in CPU clock cycles, is returned in the -.Em time -member. +These functions used to provide an interface to the CPU performance counters. +They are now deprecated, and always fail. .Sh RETURN VALUES Upon successful completion zero is returned, otherwise \-1 is returned on failure.