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

This commit is contained in:
knakahara 2018-11-26 23:20:56 +00:00
parent 73e2364e6c
commit 4ed6c77e42
2 changed files with 47 additions and 3 deletions

View File

@ -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.
@ -311,6 +311,45 @@ init_intel_goldmont(void)
return &intel_goldmont;
}
/*
* 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.
*
@ -514,6 +553,9 @@ init_intel_generic(void)
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 */

View File

@ -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 Skylake/Kabylake
x86 Intel Silvermont/Airmont
.It
x86 Intel Goldmont
.It
x86 Intel Goldmont Plus
.El
.Sh DIAGNOSTICS
The