Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Retire libpmc. It uses the legacy PMC interface in the kerne...



details:   https://anonhg.NetBSD.org/src/rev/9f33035f395a
branches:  trunk
changeset: 320549:9f33035f395a
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Jul 12 06:52:48 2018 +0000

description:
Retire libpmc. It uses the legacy PMC interface in the kernel, which has
support for only one ARM CPU. It used to have x86 support, but it was broken
and I removed it. The legacy PMC interface will be removed from the kernel
too. Sent on tech-kern@ yesterday, thorpej was fine.

diffstat:

 distrib/sets/lists/base/ad.arm     |    8 +-
 distrib/sets/lists/comp/ad.arm     |    6 +-
 distrib/sets/lists/comp/ad.arm.shl |    4 +-
 distrib/sets/lists/debug/ad.arm    |    6 +-
 lib/Makefile                       |    4 +-
 lib/libpmc/Makefile                |   18 -
 lib/libpmc/pmc.3                   |  816 -------------------------------------
 lib/libpmc/pmc.c                   |  242 ----------
 lib/libpmc/pmc.h                   |   65 --
 lib/libpmc/pmc_arm.c               |   85 ---
 lib/libpmc/pmc_private.h           |   45 --
 lib/libpmc/shlib_version           |    4 -
 share/mk/bsd.README                |    3 +-
 13 files changed, 15 insertions(+), 1291 deletions(-)

diffs (truncated from 1413 to 300 lines):

diff -r 960f4e7ef1a1 -r 9f33035f395a distrib/sets/lists/base/ad.arm
--- a/distrib/sets/lists/base/ad.arm    Thu Jul 12 02:26:04 2018 +0000
+++ b/distrib/sets/lists/base/ad.arm    Thu Jul 12 06:52:48 2018 +0000
@@ -1,13 +1,13 @@
-# $NetBSD: ad.arm,v 1.78 2018/01/24 09:04:41 skrll Exp $
+# $NetBSD: ad.arm,v 1.79 2018/07/12 06:52:48 maxv Exp $
 ./libexec/ld.elf_so-oabi                       base-sysutil-bin        compat,pic
 ./sbin/ldconfig                                        base-sysutil-root       pic,endian=1234
 ./usr/bin/fdformat                             base-util-bin
 ./usr/lib/libarm.so                            base-sys-shlib          pic,compatfile
 ./usr/lib/libarm.so.0                          base-sys-shlib          pic,compatfile
 ./usr/lib/libarm.so.0.0                                base-sys-shlib          pic,compatfile
-./usr/lib/libpmc.so                            base-sys-shlib          pic,compatfile
-./usr/lib/libpmc.so.1                          base-sys-shlib          pic,compatfile
-./usr/lib/libpmc.so.1.0                                base-sys-shlib          pic,compatfile
+./usr/lib/libpmc.so                            base-obsolete           obsolete
+./usr/lib/libpmc.so.1                          base-obsolete           obsolete
+./usr/lib/libpmc.so.1.0                                base-obsolete           obsolete
 ./usr/lib/oabi/libc_vfp.so.0                   base-compat-shlib       compat,pic
 ./usr/lib/oabi/libc_vfp.so.0.0                 base-compat-shlib       compat,pic
 ./usr/libexec/ld.elf_so-oabi                   base-sysutil-bin        compat,pic
diff -r 960f4e7ef1a1 -r 9f33035f395a distrib/sets/lists/comp/ad.arm
--- a/distrib/sets/lists/comp/ad.arm    Thu Jul 12 02:26:04 2018 +0000
+++ b/distrib/sets/lists/comp/ad.arm    Thu Jul 12 06:52:48 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.84 2018/03/20 10:14:29 ryo Exp $
+# $NetBSD: ad.arm,v 1.85 2018/07/12 06:52:49 maxv Exp $
 ./usr/include/acorn26                          comp-obsolete           obsolete
 ./usr/include/acorn26/ansi.h                   comp-obsolete           obsolete
 ./usr/include/acorn26/aout_machdep.h           comp-obsolete           obsolete
@@ -678,8 +678,8 @@
 ./usr/lib/libarm_p.a                           comp-c-lib              profile,compatfile
 ./usr/lib/libc_vfp.a                           comp-c-lib              softfloat
 ./usr/lib/libc_vfp_p.a                         comp-c-lib              profile,softfloat
-./usr/lib/libpmc.a                             comp-c-lib              compatfile
-./usr/lib/libpmc_p.a                           comp-c-proflib          profile,compatfile
+./usr/lib/libpmc.a                             comp-obsolete           obsolete
+./usr/lib/libpmc_p.a                           comp-obsolete           obsolete
 ./usr/lib/oabi/libc_vfp.a                      comp-c-lib              compat
 ./usr/lib/oabi/libc_vfp.so                     base-sys-shlib          compat,pic
 ./usr/lib/oabi/libc_vfp_p.a                    comp-c-proflib          compat,profile
diff -r 960f4e7ef1a1 -r 9f33035f395a distrib/sets/lists/comp/ad.arm.shl
--- a/distrib/sets/lists/comp/ad.arm.shl        Thu Jul 12 02:26:04 2018 +0000
+++ b/distrib/sets/lists/comp/ad.arm.shl        Thu Jul 12 06:52:48 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: ad.arm.shl,v 1.7 2015/07/03 15:11:04 matt Exp $
+# $NetBSD: ad.arm.shl,v 1.8 2018/07/12 06:52:49 maxv Exp $
 ./usr/lib/libarm32_pic.a                       comp-obsolete           obsolete
 ./usr/lib/libarm_pic.a                         comp-c-piclib           picinstall,compatfile
 ./usr/lib/libc_vfp_pic.a                       comp-c-piclib           softfloat,picinstall
-./usr/lib/libpmc_pic.a                         comp-c-piclib           picinstall,compatfile
+./usr/lib/libpmc_pic.a                         comp-obsolete           obsolete
 ./usr/lib/oabi/libc_vfp_pic.a                  comp-c-piclib           picinstall,compat
diff -r 960f4e7ef1a1 -r 9f33035f395a distrib/sets/lists/debug/ad.arm
--- a/distrib/sets/lists/debug/ad.arm   Thu Jul 12 02:26:04 2018 +0000
+++ b/distrib/sets/lists/debug/ad.arm   Thu Jul 12 06:52:48 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: ad.arm,v 1.75 2017/10/06 19:21:17 christos Exp $
+# $NetBSD: ad.arm,v 1.76 2018/07/12 06:52:49 maxv Exp $
 ./usr/lib/libarm_g.a                           comp-c-debuglib         debuglib,compatfile
 ./usr/lib/libc_vfp_g.a                         comp-c-debuglib         debuglib,softfloat
-./usr/lib/libpmc_g.a                           comp-c-debuglib         debuglib,compatfile
+./usr/lib/libpmc_g.a                           comp-obsolete           obsolete
 ./usr/lib/oabi/libc_vfp_g.a                    comp-c-debuglib         debuglib,compat
 ./usr/lib/oabi/libgmp_g.a                      comp-obsolete           obsolete
 ./usr/lib/oabi/libmpc_g.a                      comp-obsolete           obsolete
@@ -12,7 +12,7 @@
 ./usr/libdata/debug/usr/bin/fdformat.debug     comp-util-debug         debug
 ./usr/libdata/debug/usr/lib/libarm.so.0.0.debug        comp-sys-debug          debug,pic,compatfile
 ./usr/libdata/debug/usr/lib/libc_vfp.so.0.0.debug      comp-sys-debug          debug,pic,softfloat
-./usr/libdata/debug/usr/lib/libpmc.so.1.0.debug        comp-sys-debug          debug,pic,compatfile
+./usr/libdata/debug/usr/lib/libpmc.so.1.0.debug        comp-obsolete           obsolete
 ./usr/libdata/debug/usr/lib/oabi/libc_vfp.so.0.0.debug comp-sys-debug          debug,compat,pic
 ./usr/libdata/debug/usr/lib/oabi/libproc.so.1.0.debug  comp-sys-debug  debug,compat,dtrace
 ./usr/libdata/debug/usr/lib/oabi/librtld_db.so.0.0.debug       comp-sys-debug  debug,compat,dtrace
diff -r 960f4e7ef1a1 -r 9f33035f395a lib/Makefile
--- a/lib/Makefile      Thu Jul 12 02:26:04 2018 +0000
+++ b/lib/Makefile      Thu Jul 12 06:52:48 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.258 2018/06/28 10:14:27 christos Exp $
+#      $NetBSD: Makefile,v 1.259 2018/07/12 06:52:49 maxv Exp $
 #      from: @(#)Makefile      5.25.1.1 (Berkeley) 5/7/91
 
 .include <bsd.own.mk>
@@ -24,7 +24,7 @@
                libbluetooth libbsdmalloc libbz2 \
                libcompat libcrypt \
                libintl libipsec libkvm libm \
-               libossaudio libpci libpmc libposix libprop libpthread \
+               libossaudio libpci libposix libprop libpthread \
                libpuffs libresolv librmt librpcsvc librt \
                libtelnet libterminfo \
                libusbhid libutil libwrap liby libz
diff -r 960f4e7ef1a1 -r 9f33035f395a lib/libpmc/Makefile
--- a/lib/libpmc/Makefile       Thu Jul 12 02:26:04 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#      $NetBSD: Makefile,v 1.2 2016/01/23 21:44:55 christos Exp $
-
-.include <bsd.own.mk>
-
-MAN=   pmc.3
-
-.if exists(${.CURDIR}/pmc_${MACHINE_CPU}.c)
-LIB=   pmc
-SRCS=  pmc.c
-SRCS+= pmc_${MACHINE_CPU}.c
-CPPFLAGS+=     -D_KERNTYPES
-
-INCS=  pmc.h
-INCSDIR=/usr/include
-.include <bsd.lib.mk>
-.else
-.include <bsd.man.mk>
-.endif
diff -r 960f4e7ef1a1 -r 9f33035f395a lib/libpmc/pmc.3
--- a/lib/libpmc/pmc.3  Thu Jul 12 02:26:04 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,816 +0,0 @@
-.\"    $NetBSD: pmc.3,v 1.6 2005/10/31 11:45:49 uwe Exp $
-.\"
-.\" Copyright (c) 2002 Wasabi Systems, Inc.
-.\" All rights reserved.
-.\"
-.\" Written by Jason R. Thorpe for Wasabi Systems, Inc.
-.\"
-.\" 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 for the NetBSD Project by
-.\"    Wasabi Systems, Inc.
-.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
-.\"    or promote products derived from this software without specific prior
-.\"    written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
-.\" 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 8, 2002
-.Dt PMC 3
-.Os
-.Sh NAME
-.Nm pmc_configure_counter ,
-.Nm pmc_start_counter ,
-.Nm pmc_stop_counter ,
-.Nm pmc_get_num_counters ,
-.Nm pmc_get_counter_class ,
-.Nm pmc_get_counter_type ,
-.Nm pmc_get_counter_value ,
-.Nm pmc_get_accumulated_counter_value ,
-.Nm pmc_get_counter_class_name ,
-.Nm pmc_get_counter_type_name ,
-.Nm pmc_get_counter_event_name ,
-.Nm pmc_get_counter_event_list
-.Nd performance counter interface library
-.Sh LIBRARY
-.Lb libpmc
-.Sh SYNOPSIS
-.In pmc.h
-.Ft int
-.Fn pmc_configure_counter "int ctr" "const char *evname" \
-    "pmc_ctr_t reset_val" "uint32_t flags"
-.Ft int
-.Fn pmc_start_counter "int ctr"
-.Ft int
-.Fn pmc_stop_counter "int ctr"
-.Ft int
-.Fn pmc_get_num_counters "void"
-.Ft int
-.Fn pmc_get_counter_class "void"
-.Ft int
-.Fn pmc_get_counter_type "int ctr" "int *typep"
-.Ft int
-.Fn pmc_get_counter_value "int ctr" "uint64_t *valp"
-.Ft int
-.Fn pmc_get_accumulated_counter_value "int ctr" "uint64_t *valp"
-.Ft const char *
-.Fn pmc_get_counter_class_name "int class"
-.Ft const char *
-.Fn pmc_get_counter_type_name "int type"
-.Ft const char *
-.Fn pmc_get_counter_event_name "pmc_evid_t event"
-.Ft const struct pmc_event *
-.Fn pmc_get_counter_event_list "void"
-.Sh DESCRIPTION
-The
-.Nm pmc
-library is an interface to performance monitoring counters available
-on some CPUs.
-.Pp
-The
-.Nm pmc
-library can count events on the following CPU families.
-Each second-level entry describes a performance counter class.
-A given class may apply to multiple individual CPU models.
-Each class has one or more counter types.
-A CPU may have more than one counter of a given type.
-Refer to the corresponding processor programmer's manual for
-more information about individual events.
-.Bl -bullet
-.It
-ARM
-.Bl -bullet
-.It
-Intel i80200
-.Pq PMC_CLASS_I80200
-.Pp
-There are two types of counters available in this class:
-.Bl -tag -width PMC_TYPE_I80200_CCNTxx
-.It PMC_TYPE_I80200_CCNT
-cycle counter
-.It PMC_TYPE_I80200_PMCx
-performance counter
-.El
-.Pp
-The following events may be counted by a counter of type
-PMC_TYPE_I80200_CCNT:
-.Pp
-.Bl -item -offset indent -compact
-.It
-clock
-.It
-clock-div-64
-.El
-.Pp
-The following events may be counted by a counter of type
-PMC_TYPE_I80200_PMCx:
-.Pp
-.Bl -item -offset indent -compact
-.It
-insfetch-miss
-.It
-insfetch-stall
-.It
-datadep-stall
-.It
-itlb-miss
-.It
-dtlb-miss
-.It
-branch-taken
-.It
-branch-mispredicted
-.It
-instruction-executed
-.It
-dcachebufffull-stall-time
-.It
-dcachebufffull-stall-count
-.It
-dcache-access
-.It
-dcache-miss
-.It
-dcache-writeback
-.It
-swchange-pc
-.It
-bcu-mem-request
-.It
-bcu-queue-full
-.It
-bcu-queue-drain
-.It
-bcu-ecc-no-elog
-.It
-bcu-1bit-error
-.It
-narrow-ecc-caused-rmw
-.El
-.El
-.It
-i386
-.Bl -bullet
-.It
-Intel i586
-.Pq PMC_CLASS_I586
-.Pp
-There are two types of counters available in this class:
-.Bl -tag -width PMC_TYPE_I586_PMCxxx
-.It PMC_TYPE_I586_TSC
-cycle counter
-.It PMC_TYPE_I586_PMCx
-performance counter



Home | Main Index | Thread Index | Old Index