Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/tprof tprof: Add goldmont plus support. Tested by m...



details:   https://anonhg.NetBSD.org/src/rev/4ce5774ad47a
branches:  trunk
changeset: 446199:4ce5774ad47a
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Nov 26 23:20:56 2018 +0000

description:
tprof: Add goldmont plus support. Tested by msaitoh@n.o, thanks.

diffstat:

 usr.sbin/tprof/arch/tprof_x86.c |  44 ++++++++++++++++++++++++++++++++++++++++-
 usr.sbin/tprof/tprof.8          |   6 +++-
 2 files changed, 47 insertions(+), 3 deletions(-)

diffs (92 lines):

diff -r 2ce273049bd2 -r 4ce5774ad47a usr.sbin/tprof/arch/tprof_x86.c
--- a/usr.sbin/tprof/arch/tprof_x86.c   Mon Nov 26 21:56:04 2018 +0000
+++ b/usr.sbin/tprof/arch/tprof_x86.c   Mon Nov 26 23:20:56 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tprof_x86.c,v 1.6 2018/11/26 07:45:47 knakahara Exp $  */
+/*     $NetBSD: tprof_x86.c,v 1.7 2018/11/26 23:20:57 knakahara Exp $  */
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -312,6 +312,45 @@
 }
 
 /*
+ * Intel Goldmont Plus (Additions from Goldmont)
+ */
+static struct name_to_event intel_goldmontplus_names[] = {
+       { "INST_RETIRED.ANY",                           0x00,   0x01, true },
+       { "DTLB_LOAD_MISSES.WALK_COMPLETED_4K",         0x08,   0x02, true },
+       { "DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M",      0x08,   0x04, true },
+       { "DTLB_LOAD_MISSES.WALK_COMPLETED_1GB",        0x08,   0x08, true },
+       { "DTLB_LOAD_MISSES.WALK_PENDING",              0x08,   0x10, true },
+       { "DTLB_STORE_MISSES.WALK_COMPLETED_4K",        0x49,   0x02, true },
+       { "DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M",     0x49,   0x04, true },
+       { "DTLB_STORE_MISSES.WALK_COMPLETED_1GB",       0x49,   0x08, true },
+       { "DTLB_STORE_MISSES.WALK_PENDING",             0x49,   0x10, true },
+       { "EPT.WALK_PENDING",                           0x4F,   0x10, true },
+       { "ITLB_MISSES.WALK_COMPLETED_4K",              0x85,   0x08, true },
+       { "ITLB_MISSES.WALK_COMPLETED_2M_4M",           0x85,   0x04, true },
+       { "ITLB_MISSES.WALK_COMPLETED_1GB",             0x85,   0x08, true },
+       { "ITLB_MISSES.WALK_PENDING",                   0x85,   0x10, true },
+       { "TLB_FLUSHES.STLB_ANY",                       0xBD,   0x20, true },
+       { "MACHINE_CLEARS.PAGE_FAULT",                  0xC3,   0x20, true },
+};
+
+static struct event_table intel_goldmontplus = {
+       .tablename = "Intel Goldmont Plus",
+       .names = intel_goldmontplus_names,
+       .nevents = sizeof(intel_goldmontplus_names) /
+           sizeof(struct name_to_event),
+       .next = NULL
+};
+
+static struct event_table *
+init_intel_goldmontplus(void)
+{
+
+       intel_goldmont.next = &intel_goldmontplus;
+
+       return &intel_goldmont;
+}
+
+/*
  * Intel Skylake/Kabylake.
  *
  * The events that are not listed, because they are of little interest or
@@ -514,6 +553,9 @@
                case 0x5F: /* Goldmont (Denvertion) */
                        table->next = init_intel_goldmont();
                        break;
+               case 0x7A: /* Goldmont Plus (Gemini Lake) */
+                       table->next = init_intel_goldmontplus();
+                       break;
                case 0x4E: /* Skylake */
                case 0x5E: /* Skylake */
                case 0x8E: /* Kabylake */
diff -r 2ce273049bd2 -r 4ce5774ad47a usr.sbin/tprof/tprof.8
--- a/usr.sbin/tprof/tprof.8    Mon Nov 26 21:56:04 2018 +0000
+++ b/usr.sbin/tprof/tprof.8    Mon Nov 26 23:20:56 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: tprof.8,v 1.12 2018/11/26 07:45:47 knakahara Exp $
+.\"    $NetBSD: tprof.8,v 1.13 2018/11/26 23:20:56 knakahara Exp $
 .\"
 .\" Copyright (c)2011 YAMAMOTO Takashi,
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd November 26, 2018
+.Dd November 27, 2018
 .Dt TPROF 8
 .Os
 .Sh NAME
@@ -137,6 +137,8 @@
 x86 Intel Silvermont/Airmont
 .It
 x86 Intel Goldmont
+.It
+x86 Intel Goldmont Plus
 .El
 .Sh DIAGNOSTICS
 The



Home | Main Index | Thread Index | Old Index