Source-Changes-HG archive

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

[src/trunk]: src Remove the X86PMC code I had written, replaced by tprof. Man...



details:   https://anonhg.NetBSD.org/src/rev/5658dc5e1777
branches:  trunk
changeset: 363148:5658dc5e1777
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Jul 13 09:37:32 2018 +0000

description:
Remove the X86PMC code I had written, replaced by tprof. Many defines
become unused in specialreg.h, so remove them. We don't want to add
defines all the time, there are countless PMCs on many generations, and
it's better to just inline the event/unit values.

diffstat:

 share/man/man4/options.4          |    5 +-
 share/man/man9/intro.9            |    8 +-
 sys/arch/amd64/conf/ALL           |    6 +-
 sys/arch/amd64/conf/GENERIC       |    6 +-
 sys/arch/amd64/conf/files.amd64   |    3 +-
 sys/arch/i386/conf/ALL            |    5 +-
 sys/arch/i386/conf/GENERIC        |    5 +-
 sys/arch/i386/conf/NET4501        |    5 +-
 sys/arch/i386/conf/files.i386     |    3 +-
 sys/arch/x86/conf/files.x86       |    3 +-
 sys/arch/x86/include/specialreg.h |  400 +-----------------------------
 sys/arch/x86/include/sysarch.h    |   66 +----
 sys/arch/x86/x86/pmc.c            |  511 --------------------------------------
 sys/arch/x86/x86/sys_machdep.c    |   20 +-
 sys/arch/x86/x86/x86_machdep.c    |    6 +-
 sys/arch/xen/conf/files.compat    |    3 +-
 16 files changed, 24 insertions(+), 1031 deletions(-)

diffs (truncated from 1379 to 300 lines):

diff -r 7412927f3250 -r 5658dc5e1777 share/man/man4/options.4
--- a/share/man/man4/options.4  Fri Jul 13 09:15:55 2018 +0000
+++ b/share/man/man4/options.4  Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: options.4,v 1.489 2018/07/12 10:46:41 maxv Exp $
+.\"    $NetBSD: options.4,v 1.490 2018/07/13 09:37:32 maxv Exp $
 .\"
 .\" Copyright (c) 1996
 .\"    Perry E. Metzger.  All rights reserved.
@@ -30,7 +30,7 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\"
-.Dd July 12, 2018
+.Dd July 13, 2018
 .Dt OPTIONS 4
 .Os
 .Sh NAME
@@ -2702,7 +2702,6 @@
 .Xr gcc 1 ,
 .Xr gdb 1 ,
 .Xr ktrace 1 ,
-.Xr pmc 1 ,
 .Xr quota 1 ,
 .Xr vndcompress 1 ,
 .Xr gettimeofday 2 ,
diff -r 7412927f3250 -r 5658dc5e1777 share/man/man9/intro.9
--- a/share/man/man9/intro.9    Fri Jul 13 09:15:55 2018 +0000
+++ b/share/man/man9/intro.9    Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: intro.9,v 1.21 2018/05/28 08:36:36 wiz Exp $
+.\"     $NetBSD: intro.9,v 1.22 2018/07/13 09:37:32 maxv Exp $
 .\"
 .\" Copyright (c) 1997, 2007 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 May 30, 2017
+.Dd July 13, 2018
 .Dt INTRO 9
 .Os
 .Sh NAME
@@ -628,10 +628,6 @@
 See
 .Xr pmatch 9 .
 .Pp
-Hardware Performance Monitoring Interface.
-See
-.Xr pmc 9 .
-.Pp
 Add or remove a shutdown hook.
 See
 .Xr pmf 9 .
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL   Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/amd64/conf/ALL   Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.93 2018/07/12 10:39:06 maya Exp $
+# $NetBSD: ALL,v 1.94 2018/07/13 09:37:32 maxv Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "ALL-$Revision: 1.93 $"
+#ident         "ALL-$Revision: 1.94 $"
 
 maxusers       64              # estimated number of users
 
@@ -40,8 +40,6 @@
 viac7temp*     at cpu?         # VIA C7 temperature sensor
 vmt0           at cpu0         # VMware Tools
 
-options        PMC     # performance-monitoring counters support
-
 # Beep when it is safe to power down the system (requires sysbeep)
 options        BEEP_ONHALT
 # Some tunable details of the above feature (default values used below)
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.495 2018/07/12 10:39:06 maya Exp $
+# $NetBSD: GENERIC,v 1.496 2018/07/13 09:37:32 maxv Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.495 $"
+#ident         "GENERIC-$Revision: 1.496 $"
 
 maxusers       64              # estimated number of users
 
@@ -88,8 +88,6 @@
 powernow0      at cpu0         # AMD PowerNow! and Cool'n'Quiet (non-ACPI)
 vmt0           at cpu0         # VMware Tools
 
-options        PMC             # performance-monitoring counters support
-
 # Alternate buffer queue strategies for better responsiveness under high
 # disk I/O load.
 #options       BUFQ_READPRIO
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/amd64/conf/files.amd64
--- a/sys/arch/amd64/conf/files.amd64   Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/amd64/conf/files.amd64   Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.amd64,v 1.104 2018/05/23 07:45:35 maxv Exp $
+#      $NetBSD: files.amd64,v 1.105 2018/07/13 09:37:32 maxv Exp $
 #
 # new style config file for amd64 architecture
 #
@@ -27,7 +27,6 @@
 # with the i386 (they include the opt_*.h for these)
 #
 
-defflag                        PMC
 defflag                        USER_LDT
 defflag                        KASLR
 defflag eisa.h EISA
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL    Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/i386/conf/ALL    Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.442 2018/07/10 19:58:13 maya Exp $
+# $NetBSD: ALL,v 1.443 2018/07/13 09:37:32 maxv Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "ALL-$Revision: 1.442 $"
+#ident         "ALL-$Revision: 1.443 $"
 
 maxusers       64              # estimated number of users
 
@@ -41,7 +41,6 @@
 vmt0           at cpu0         # VMware Tools
 
 options        MTRR            # memory-type range register syscall support
-options        PMC             # performance-monitoring counters support
 
 options        MULTIBOOT       # Multiboot support (see multiboot(8))
 
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC        Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/i386/conf/GENERIC        Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1182 2018/07/10 19:58:13 maya Exp $
+# $NetBSD: GENERIC,v 1.1183 2018/07/13 09:37:32 maxv Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.1182 $"
+#ident         "GENERIC-$Revision: 1.1183 $"
 
 maxusers       64              # estimated number of users
 
@@ -44,7 +44,6 @@
 vmt0           at cpu0         # VMware Tools
 
 options        MTRR            # memory-type range register syscall support
-options        PMC             # performance-monitoring counters support
 
 options        MULTIBOOT       # Multiboot support (see multiboot(8))
 
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/i386/conf/NET4501
--- a/sys/arch/i386/conf/NET4501        Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/i386/conf/NET4501        Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: NET4501,v 1.100 2017/11/06 02:57:18 rin Exp $
+# $NetBSD: NET4501,v 1.101 2018/07/13 09:37:32 maxv Exp $
 #
 # NET4501 -- kernel configuration for a Soekris Engineering net4501
 # single-board computer.
@@ -10,7 +10,7 @@
 
 #options       INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "NET4501-$Revision: 1.100 $"
+#ident                 "NET4501-$Revision: 1.101 $"
 
 maxusers       32              # estimated number of users
 
@@ -23,7 +23,6 @@
 #options       USER_LDT        # user-settable LDT; used by WINE
 
 #options       MTRR            # memory-type range register syscall support
-#options       PMC             # performance-monitoring counters support
 
 # delay between "rebooting ..." message and hardware reset, in milliseconds
 #options       CPURESET_DELAY=2000
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/i386/conf/files.i386
--- a/sys/arch/i386/conf/files.i386     Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/i386/conf/files.i386     Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.i386,v 1.394 2018/05/23 07:45:35 maxv Exp $
+#      $NetBSD: files.i386,v 1.395 2018/07/13 09:37:32 maxv Exp $
 #
 # new style config file for i386 architecture
 #
@@ -18,7 +18,6 @@
 # Obsolete Xbox support
 obsolete defflag       XBOX
 
-defflag                        PMC
 defflag                        KASLR
 
 # User-settable LDT (used by WINE)
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/x86/conf/files.x86
--- a/sys/arch/x86/conf/files.x86       Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/x86/conf/files.x86       Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.x86,v 1.101 2018/05/22 11:09:57 maxv Exp $
+#      $NetBSD: files.x86,v 1.102 2018/07/13 09:37:32 maxv Exp $
 
 # options for MP configuration through the MP spec
 defflag opt_mpbios.h MPBIOS MPDEBUG MPBIOS_SCANPCI
@@ -96,7 +96,6 @@
 file   arch/x86/x86/platform.c         machdep
 file   arch/x86/x86/pmap.c             machdep
 file   arch/x86/x86/x86_tlb.c          machdep
-file   arch/x86/x86/pmc.c              machdep
 file   arch/x86/x86/procfs_machdep.c   procfs
 file   arch/x86/x86/svs.c              machdep & svs
 file   arch/x86/x86/sys_machdep.c      machdep
diff -r 7412927f3250 -r 5658dc5e1777 sys/arch/x86/include/specialreg.h
--- a/sys/arch/x86/include/specialreg.h Fri Jul 13 09:15:55 2018 +0000
+++ b/sys/arch/x86/include/specialreg.h Fri Jul 13 09:37:32 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: specialreg.h,v 1.127 2018/07/04 07:55:57 maya Exp $    */
+/*     $NetBSD: specialreg.h,v 1.128 2018/07/13 09:37:32 maxv Exp $    */
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -930,401 +930,3 @@
 #define NCR_SIZE_16M   13
 #define NCR_SIZE_32M   14
 #define NCR_SIZE_4G    15
-
-/*
- * Performance monitor events.
- *
- * Note that 586-class and 686-class CPUs have different performance
- * monitors available, and they are accessed differently:
- *
- *     686-class: `rdpmc' instruction
- *     586-class: `rdmsr' instruction, CESR MSR
- *
- * The descriptions of these events are too lengthy to include here.
- * See Appendix A of "Intel Architecture Software Developer's
- * Manual, Volume 3: System Programming" for more information.
- */
-
-/*
- * 586-class CESR MSR format.  Lower 16 bits is CTR0, upper 16 bits
- * is CTR1.
- */
-
-#define PMC5_CESR_EVENT                        0x003f
-#define PMC5_CESR_OS                   0x0040
-#define PMC5_CESR_USR                  0x0080
-#define PMC5_CESR_E                    0x0100
-#define PMC5_CESR_P                    0x0200
-
-#define PMC5_DATA_READ                 0x00
-#define PMC5_DATA_WRITE                        0x01
-#define PMC5_DATA_TLB_MISS             0x02
-#define PMC5_DATA_READ_MISS            0x03
-#define PMC5_DATA_WRITE_MISS           0x04
-#define PMC5_WRITE_M_E                 0x05
-#define PMC5_DATA_LINES_WBACK          0x06
-#define PMC5_DATA_CACHE_SNOOP          0x07
-#define PMC5_DATA_CACHE_SNOOP_HIT      0x08
-#define PMC5_MEM_ACCESS_BOTH_PIPES     0x09
-#define PMC5_BANK_CONFLICTS            0x0a
-#define PMC5_MISALIGNED_DATA           0x0b
-#define PMC5_INST_READ                 0x0c
-#define PMC5_INST_TLB_MISS             0x0d
-#define PMC5_INST_CACHE_MISS           0x0e
-#define PMC5_SEGMENT_REG_LOAD          0x0f
-#define PMC5_BRANCHES                  0x12
-#define PMC5_BTB_HITS                  0x13
-#define PMC5_BRANCH_TAKEN              0x14
-#define PMC5_PIPELINE_FLUSH            0x15
-#define PMC5_INST_EXECUTED             0x16
-#define PMC5_INST_EXECUTED_V_PIPE      0x17
-#define PMC5_BUS_UTILIZATION           0x18



Home | Main Index | Thread Index | Old Index