Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src All things considered, remove the i386_pmc API. I deprecated...
details: https://anonhg.NetBSD.org/src/rev/84fc952f0eb8
branches: trunk
changeset: 355743:84fc952f0eb8
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Aug 12 08:21:30 2017 +0000
description:
All things considered, remove the i386_pmc API. I deprecated it some
months ago, and clearly no one should be using it.
(reminder: our new PMCs use the same sysarch, but the arguments are
opaque and not compatible with the previous versions)
diffstat:
distrib/sets/lists/comp/mi | 20 ++++++------
lib/libarch/i386/Makefile.inc | 11 ++----
lib/libarch/i386/i386_pmc.c | 60 ----------------------------------------
lib/libarch/i386/i386_pmc_info.2 | 55 ------------------------------------
4 files changed, 14 insertions(+), 132 deletions(-)
diffs (196 lines):
diff -r e259bf25c715 -r 84fc952f0eb8 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Sat Aug 12 08:03:57 2017 +0000
+++ b/distrib/sets/lists/comp/mi Sat Aug 12 08:21:30 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.2144 2017/08/12 07:59:42 maxv Exp $
+# $NetBSD: mi,v 1.2145 2017/08/12 08:21:30 maxv Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
./etc/mtree/set.comp comp-sys-root
@@ -4161,9 +4161,9 @@
./usr/share/man/cat2/i386_get_ldt.0 comp-c-catman .cat
./usr/share/man/cat2/i386_get_mtrr.0 comp-c-catman .cat
./usr/share/man/cat2/i386_iopl.0 comp-c-catman .cat
-./usr/share/man/cat2/i386_pmc_info.0 comp-c-catman .cat
-./usr/share/man/cat2/i386_pmc_read.0 comp-c-catman .cat
-./usr/share/man/cat2/i386_pmc_startstop.0 comp-c-catman .cat
+./usr/share/man/cat2/i386_pmc_info.0 comp-obsolete obsolete
+./usr/share/man/cat2/i386_pmc_read.0 comp-obsolete obsolete
+./usr/share/man/cat2/i386_pmc_startstop.0 comp-obsolete obsolete
./usr/share/man/cat2/i386_set_ioperm.0 comp-obsolete obsolete
./usr/share/man/cat2/i386_set_ldt.0 comp-c-catman .cat
./usr/share/man/cat2/i386_set_mtrr.0 comp-c-catman .cat
@@ -11814,9 +11814,9 @@
./usr/share/man/html2/i386_get_ldt.html comp-c-htmlman html
./usr/share/man/html2/i386_get_mtrr.html comp-c-htmlman html
./usr/share/man/html2/i386_iopl.html comp-c-htmlman html
-./usr/share/man/html2/i386_pmc_info.html comp-c-htmlman html
-./usr/share/man/html2/i386_pmc_read.html comp-c-htmlman html
-./usr/share/man/html2/i386_pmc_startstop.html comp-c-htmlman html
+./usr/share/man/html2/i386_pmc_info.html comp-obsolete obsolete
+./usr/share/man/html2/i386_pmc_read.html comp-obsolete obsolete
+./usr/share/man/html2/i386_pmc_startstop.html comp-obsolete obsolete
./usr/share/man/html2/i386_set_ldt.html comp-c-htmlman html
./usr/share/man/html2/i386_set_mtrr.html comp-c-htmlman html
./usr/share/man/html2/i386_vm86.html comp-obsolete obsolete
@@ -19245,9 +19245,9 @@
./usr/share/man/man2/i386_get_ldt.2 comp-c-man .man
./usr/share/man/man2/i386_get_mtrr.2 comp-c-man .man
./usr/share/man/man2/i386_iopl.2 comp-c-man .man
-./usr/share/man/man2/i386_pmc_info.2 comp-c-man .man
-./usr/share/man/man2/i386_pmc_read.2 comp-c-man .man
-./usr/share/man/man2/i386_pmc_startstop.2 comp-c-man .man
+./usr/share/man/man2/i386_pmc_info.2 comp-obsolete obsolete
+./usr/share/man/man2/i386_pmc_read.2 comp-obsolete obsolete
+./usr/share/man/man2/i386_pmc_startstop.2 comp-obsolete obsolete
./usr/share/man/man2/i386_set_ioperm.2 comp-obsolete obsolete
./usr/share/man/man2/i386_set_ldt.2 comp-c-man .man
./usr/share/man/man2/i386_set_mtrr.2 comp-c-man .man
diff -r e259bf25c715 -r 84fc952f0eb8 lib/libarch/i386/Makefile.inc
--- a/lib/libarch/i386/Makefile.inc Sat Aug 12 08:03:57 2017 +0000
+++ b/lib/libarch/i386/Makefile.inc Sat Aug 12 08:21:30 2017 +0000
@@ -1,17 +1,14 @@
-# $NetBSD: Makefile.inc,v 1.16 2017/08/12 07:59:42 maxv Exp $
+# $NetBSD: Makefile.inc,v 1.17 2017/08/12 08:21:30 maxv Exp $
.if (${MACHINE_ARCH} == "i386" || ${MLIBDIR:Unone} == "i386")
SRCS+= i386_get_ldt.c i386_set_ldt.c \
i386_iopl.c i386_get_ioperm.c i386_set_ioperm.c \
- i386_pmc.c i386_mtrr.c
+ i386_mtrr.c
.endif
MAN+= i386_get_ldt.2 \
i386_get_mtrr.2 \
- i386_iopl.2 \
- i386_pmc_info.2
+ i386_iopl.2
MLINKS+=i386_get_ldt.2 i386_set_ldt.2 \
- i386_get_mtrr.2 i386_set_mtrr.2 \
- i386_pmc_info.2 i386_pmc_startstop.2 \
- i386_pmc_info.2 i386_pmc_read.2
+ i386_get_mtrr.2 i386_set_mtrr.2
diff -r e259bf25c715 -r 84fc952f0eb8 lib/libarch/i386/i386_pmc.c
--- a/lib/libarch/i386/i386_pmc.c Sat Aug 12 08:03:57 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/* $NetBSD: i386_pmc.c,v 1.4 2017/03/08 16:09:27 maxv Exp $ */
-
-/*-
- * Copyright (c) 2000 Zembu Labs, Inc.
- * All rights reserved.
- *
- * Author: Jason R. Thorpe <thorpej%zembu.com@localhost>
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Zembu Labs, Inc.
- * 4. Neither the name of Zembu Labs nor the names of its employees may
- * be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR-
- * RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
- * CLAIMED. IN NO EVENT SHALL ZEMBU LABS 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.
- */
-
-/*
- * Interface to x86 CPU Performance Counters.
- */
-
-#include <sys/types.h>
-
-#include <machine/sysarch.h>
-
-int
-i386_pmc_info(struct i386_pmc_info_args *args)
-{
- return -1;
-}
-
-int
-i386_pmc_startstop(struct i386_pmc_startstop_args *args)
-{
- return -1;
-}
-
-int
-i386_pmc_read(struct i386_pmc_read_args *args)
-{
- return -1;
-}
diff -r e259bf25c715 -r 84fc952f0eb8 lib/libarch/i386/i386_pmc_info.2
--- a/lib/libarch/i386/i386_pmc_info.2 Sat Aug 12 08:03:57 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-.\" $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.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Gregory McGarry.
-.\"
-.\" 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 THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
-.\"
-.Dd August 6, 2017
-.Dt I386_PMC_INFO 2 i386
-.Os
-.Sh NAME
-.Nm i386_pmc_info ,
-.Nm i386_pmc_startstop ,
-.Nm i386_pmc_read
-.Nd interface to CPU performance counters
-.Sh LIBRARY
-.Lb libi386
-.Sh SYNOPSIS
-.In sys/types.h
-.In machine/sysarch.h
-.In machine/specialreg.h
-.Ft int
-.Fn i386_pmc_info "struct i386_pmc_info_args *ia"
-.Ft int
-.Fn i386_pmc_startstop "struct i386_pmc_startstop_args *ssa"
-.Ft int
-.Fn i386_pmc_read "struct i386_pmc_read_args *ra"
-.Sh DESCRIPTION
-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.
Home |
Main Index |
Thread Index |
Old Index