Source-Changes-HG archive

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

[src/trunk]: src Remove the usr.bin/pmc tool. People should use tprof instead.



details:   https://anonhg.NetBSD.org/src/rev/8ddcde477560
branches:  trunk
changeset: 320589:8ddcde477560
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Jul 13 09:15:55 2018 +0000

description:
Remove the usr.bin/pmc tool. People should use tprof instead.

diffstat:

 distrib/sets/lists/base/md.amd64  |    4 +-
 distrib/sets/lists/base/md.i386   |    4 +-
 distrib/sets/lists/debug/md.amd64 |    4 +-
 distrib/sets/lists/debug/md.i386  |    4 +-
 distrib/sets/lists/man/mi         |    8 +-
 usr.bin/pmc/Makefile              |    9 -
 usr.bin/pmc/pmc.1                 |  152 ---------
 usr.bin/pmc/pmc.c                 |  629 --------------------------------------
 8 files changed, 12 insertions(+), 802 deletions(-)

diffs (truncated from 909 to 300 lines):

diff -r 5a40446c11a1 -r 8ddcde477560 distrib/sets/lists/base/md.amd64
--- a/distrib/sets/lists/base/md.amd64  Fri Jul 13 09:04:31 2018 +0000
+++ b/distrib/sets/lists/base/md.amd64  Fri Jul 13 09:15:55 2018 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: md.amd64,v 1.274 2017/12/22 07:19:02 maxv Exp $
+# $NetBSD: md.amd64,v 1.275 2018/07/13 09:15:55 maxv Exp $
 ./dev/lms0                                     base-obsolete           obsolete
 ./dev/mms0                                     base-obsolete           obsolete
 ./sbin/mount_qemufwcfg                         base-sysutil-root
 ./libexec/ld.elf_so-i386                       base-sys-shlib          compat,pic
 ./usr/bin/fdformat                             base-util-bin
 ./usr/bin/iasl                                 base-util-bin
-./usr/bin/pmc                                  base-util-bin
+./usr/bin/pmc                                  base-obsolete           obsolete
 ./usr/lib/i386/libi386.so.2                    base-compat-shlib       compat,pic
 ./usr/lib/i386/libi386.so.2.0                  base-compat-shlib       compat,pic
 ./usr/lib/i386/libproc.so.1                    base-compat-shlib       compat,pic,dtrace
diff -r 5a40446c11a1 -r 8ddcde477560 distrib/sets/lists/base/md.i386
--- a/distrib/sets/lists/base/md.i386   Fri Jul 13 09:04:31 2018 +0000
+++ b/distrib/sets/lists/base/md.i386   Fri Jul 13 09:15:55 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.149 2018/07/08 16:55:37 christos Exp $
+# $NetBSD: md.i386,v 1.150 2018/07/13 09:15:55 maxv Exp $
 ./dev/lms0                                     base-obsolete           obsolete
 ./dev/mms0                                     base-obsolete           obsolete
 ./dev/pms0                                     base-obsolete           obsolete
@@ -18,7 +18,7 @@
 ./usr/bin/fdformat                             base-util-bin
 ./usr/bin/fontedit                             base-obsolete           obsolete
 ./usr/bin/iasl                                 base-util-bin
-./usr/bin/pmc                                  base-util-bin
+./usr/bin/pmc                                  base-obsolete           obsolete
 ./usr/bin/vttest                               base-obsolete           obsolete
 ./usr/lib/libi386.so                           base-sys-shlib          pic
 ./usr/lib/libi386.so.2                         base-sys-shlib          pic
diff -r 5a40446c11a1 -r 8ddcde477560 distrib/sets/lists/debug/md.amd64
--- a/distrib/sets/lists/debug/md.amd64 Fri Jul 13 09:04:31 2018 +0000
+++ b/distrib/sets/lists/debug/md.amd64 Fri Jul 13 09:15:55 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.100 2017/11/25 23:29:43 jmcneill Exp $
+# $NetBSD: md.amd64,v 1.101 2018/07/13 09:15:55 maxv Exp $
 ./usr/lib/i386/12.202++_g.a                    comp-c-debuglib         debuglib,compat,12.202xx
 ./usr/lib/i386/libi386_g.a                     comp-c-debuglib         debuglib,compat
 ./usr/lib/i386/libiberty_g.a                   comp-obsolete           obsolete
@@ -7,7 +7,7 @@
 ./usr/libdata/debug/sbin/mount_qemufwcfg.debug comp-sysutil-debug      debug
 ./usr/libdata/debug/usr/bin/fdformat.debug     comp-util-debug         debug
 ./usr/libdata/debug/usr/bin/iasl.debug         comp-util-debug         debug
-./usr/libdata/debug/usr/bin/pmc.debug          comp-util-debug         debug
+./usr/libdata/debug/usr/bin/pmc.debug          comp-obsolete           obsolete
 ./usr/libdata/debug/usr/lib/i386/libi386.so.2.0.debug  comp-compat-shlib       compat,pic,debug
 ./usr/libdata/debug/usr/lib/i386/libpam.so.4.1.debug   comp-compat-shlib       compat,pic,debug,pam
 ./usr/libdata/debug/usr/lib/i386/libproc.so.1.0.debug  comp-compat-shlib       compat,pic,debug,dtrace
diff -r 5a40446c11a1 -r 8ddcde477560 distrib/sets/lists/debug/md.i386
--- a/distrib/sets/lists/debug/md.i386  Fri Jul 13 09:04:31 2018 +0000
+++ b/distrib/sets/lists/debug/md.i386  Fri Jul 13 09:15:55 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.15 2017/11/25 23:29:43 jmcneill Exp $
+# $NetBSD: md.i386,v 1.16 2018/07/13 09:15:55 maxv Exp $
 ./usr/lib/libi386_g.a                          comp-c-debuglib         debuglib
 ./usr/lib/libm387_g.a                          comp-c-debuglib         debuglib
 ./usr/lib/libpmc_g.a                           comp-obsolete           obsolete
@@ -7,7 +7,7 @@
 ./usr/libdata/debug/sbin/mount_qemufwcfg.debug comp-sysutil-debug      debug
 ./usr/libdata/debug/usr/bin/fdformat.debug     comp-util-debug         debug
 ./usr/libdata/debug/usr/bin/iasl.debug         comp-util-debug         debug
-./usr/libdata/debug/usr/bin/pmc.debug          comp-util-debug         debug
+./usr/libdata/debug/usr/bin/pmc.debug          comp-obsolete           obsolete
 ./usr/libdata/debug/usr/lib/libi386.so.2.0.debug       comp-sys-debug  pic,debug
 ./usr/libdata/debug/usr/lib/libm387.so.0.1.debug       comp-sys-debug  pic,debug
 ./usr/libdata/debug/usr/lib/libpmc.so.1.0.debug                comp-obsolete   obsolete
diff -r 5a40446c11a1 -r 8ddcde477560 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Fri Jul 13 09:04:31 2018 +0000
+++ b/distrib/sets/lists/man/mi Fri Jul 13 09:15:55 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1596 2018/07/10 17:01:42 maya Exp $
+# $NetBSD: mi,v 1.1597 2018/07/13 09:15:56 maxv Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -436,7 +436,7 @@
 ./usr/share/man/cat1/pkg_view.0                        man-obsolete            obsolete
 ./usr/share/man/cat1/pkill.0                   man-util-catman         .cat
 ./usr/share/man/cat1/pmap.0                    man-util-catman         .cat
-./usr/share/man/cat1/pmc.0                     man-util-catman         .cat
+./usr/share/man/cat1/pmc.0                     man-obsolete            obsolete
 ./usr/share/man/cat1/popd.0                    man-util-catman         .cat
 ./usr/share/man/cat1/postalias.0               man-postfix-catman      postfix,.cat
 ./usr/share/man/cat1/postcat.0                 man-postfix-catman      postfix,.cat
@@ -3644,7 +3644,7 @@
 ./usr/share/man/html1/pkg_view.html            man-obsolete            obsolete
 ./usr/share/man/html1/pkill.html               man-util-htmlman        html
 ./usr/share/man/html1/pmap.html                        man-util-htmlman        html
-./usr/share/man/html1/pmc.html                 man-util-htmlman        html
+./usr/share/man/html1/pmc.html                 man-obsolete            obsolete
 ./usr/share/man/html1/popd.html                        man-util-htmlman        html
 ./usr/share/man/html1/postalias.html           man-postfix-htmlman     postfix,html
 ./usr/share/man/html1/postcat.html             man-postfix-htmlman     postfix,html
@@ -6498,7 +6498,7 @@
 ./usr/share/man/man1/pkg_view.1                        man-obsolete            obsolete
 ./usr/share/man/man1/pkill.1                   man-util-man            .man
 ./usr/share/man/man1/pmap.1                    man-util-man            .man
-./usr/share/man/man1/pmc.1                     man-util-man            .man
+./usr/share/man/man1/pmc.1                     man-obsolete            obsolete
 ./usr/share/man/man1/popd.1                    man-util-man            .man
 ./usr/share/man/man1/postalias.1               man-postfix-man         postfix,.man
 ./usr/share/man/man1/postcat.1                 man-postfix-man         postfix,.man
diff -r 5a40446c11a1 -r 8ddcde477560 usr.bin/pmc/Makefile
--- a/usr.bin/pmc/Makefile      Fri Jul 13 09:04:31 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-#      $NetBSD: Makefile,v 1.5 2017/07/12 17:10:09 maxv Exp $
-
-.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64")
-PROG=  pmc
-.else
-MAN=   pmc.1
-.endif
-
-.include <bsd.prog.mk>
diff -r 5a40446c11a1 -r 8ddcde477560 usr.bin/pmc/pmc.1
--- a/usr.bin/pmc/pmc.1 Fri Jul 13 09:04:31 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-.\"    $NetBSD: pmc.1,v 1.13 2017/07/13 10:59:53 wiz Exp $
-.\"
-.\" Copyright (c) 2017 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Maxime Villard.
-.\"
-.\" 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.
-.\"
-.\" 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.
-.\"
-.Dd July 12, 2017
-.Dt PMC 1
-.Os
-.Sh NAME
-.Nm pmc
-.Nd performance-monitoring counter interface
-.Sh SYNOPSIS
-.Nm pmc
-.Ar command
-.Op Ar arguments
-.Sh DESCRIPTION
-The
-.Nm
-tool can be used to control and inspect the state of the
-Performance-Monitoring Counters (PMCs) in the system.
-.Pp
-The first argument,
-.Ar command ,
-specifies the action to take.
-Valid commands are:
-.Bl -tag -width offline
-.It list
-Display a list of performance counter events available on the system.
-.It start Ar name:option Op Ar name:option ...
-Start one or several counters.
-.Ar name
-specifies the name of the event to count; it must be taken from the list of
-available events.
-.Ar option
-specifies the source of the event; it must be a combination of
-.Ar u
-(userland) and
-.Ar k
-(kernel).
-.It stop
-Stop any performance counters that are currently running, and display the
-values of these counters.
-.El
-.Sh FILES
-.Pa src/sys/arch/x86/x86/pmc.c
-x86 implementation.
-.Pp
-.Pa src/usr.bin/pmc/pmc.c
-pmc tool.
-.Sh EXAMPLES
-The following command prints the available counters.
-.Dl # pmc list
-.Pp
-The following command starts two counters.
-The former will count the 'l2cache-access' events that are triggered from
-userland, the latter will count the 'l1cache-access' events triggered from
-both userland and the kernel.
-.Dl # pmc start l2cache-access:u l1cache-access:uk
-.Pp
-Note that the two following commands are not exactly identical.
-.Dl # pmc start l1cache-access:u l1cache-access:k
-.Dl # pmc start l1cache-access:uk
-The former will start two different counters that have a different source but
-track the same event.
-The latter will start one counter that tracks the event from all sources;
-it therefore does the sum of the two counters from the first command, but
-takes only one counter to do so.
-.Sh INTERPRETING RESULTS
-For each PMC on each CPU, the value reported by the
-.Nm
-tool is the number of events counted, encoded in a 64bit integer.
-.Sh DIAGNOSTICS
-.Bl -diag
-.It PMC support not compiled into the kernel
-Performance-monitoring counter support has not been compiled into the
-kernel.
-It may be included using the
-.Em PMC
-option.
-See
-.Xr options 4
-for details.
-.El
-.Sh SEE ALSO
-.Xr options 4
-.Sh HISTORY
-The
-.Nm
-command first appeared in
-.Nx 1.6 .
-It was revamped in
-.Nx 8.0 .
-.Sh BUGS
-The
-.Nm
-command currently only supports performance-monitoring counters
-on the i386 and amd64 architectures.
diff -r 5a40446c11a1 -r 8ddcde477560 usr.bin/pmc/pmc.c
--- a/usr.bin/pmc/pmc.c Fri Jul 13 09:04:31 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,629 +0,0 @@
-/*     $NetBSD: pmc.c,v 1.25 2017/07/12 17:33:29 maxv Exp $    */
-
-/*
- * Copyright (c) 2017 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Maxime Villard.
- *
- * 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



Home | Main Index | Thread Index | Old Index