Mon Apr 10 06:08:56 2023 UTC ()
Add Cometlake support.


(msaitoh)
diff -r1.24 -r1.25 src/usr.sbin/tprof/tprof.8
diff -r1.15 -r1.16 src/usr.sbin/tprof/arch/tprof_x86.c

cvs diff -r1.24 -r1.25 src/usr.sbin/tprof/tprof.8 (expand / switch to unified diff)

--- src/usr.sbin/tprof/tprof.8 2022/12/16 08:02:04 1.24
+++ src/usr.sbin/tprof/tprof.8 2023/04/10 06:08:55 1.25
@@ -1,40 +1,40 @@ @@ -1,40 +1,40 @@
1.\" $NetBSD: tprof.8,v 1.24 2022/12/16 08:02:04 ryo Exp $ 1.\" $NetBSD: tprof.8,v 1.25 2023/04/10 06:08:55 msaitoh Exp $
2.\" 2.\"
3.\" Copyright (c)2011 YAMAMOTO Takashi, 3.\" Copyright (c)2011 YAMAMOTO Takashi,
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE. 25.\" SUCH DAMAGE.
26.\" 26.\"
27.Dd December 16, 2022 27.Dd April 10, 2023
28.Dt TPROF 8 28.Dt TPROF 8
29.Os 29.Os
30.Sh NAME 30.Sh NAME
31.Nm tprof 31.Nm tprof
32.Nd record tprof profiling samples 32.Nd record tprof profiling samples
33.Sh SYNOPSIS 33.Sh SYNOPSIS
34.Nm 34.Nm
35.Ar op 35.Ar op
36.Op Ar arguments 36.Op Ar arguments
37.Sh DESCRIPTION 37.Sh DESCRIPTION
38The 38The
39.Nm 39.Nm
40tool can be used to monitor hardware events (PMCs) during the execution of 40tool can be used to monitor hardware events (PMCs) during the execution of
@@ -198,27 +198,27 @@ ARMv7 @@ -198,27 +198,27 @@ ARMv7
198.It 198.It
199ARMv8 199ARMv8
200.It 200.It
201x86 AMD Family 10h 201x86 AMD Family 10h
202.It 202.It
203x86 AMD Family 15h 203x86 AMD Family 15h
204.It 204.It
205x86 AMD Family 17h 205x86 AMD Family 17h
206.It 206.It
207x86 AMD Family 19h 207x86 AMD Family 19h
208.It 208.It
209x86 Intel Generic (all Intel CPUs) 209x86 Intel Generic (all Intel CPUs)
210.It 210.It
211x86 Intel Skylake/Kabylake 211x86 Intel Skylake, Kabylake and Cometlake
212.It 212.It
213x86 Intel Silvermont/Airmont 213x86 Intel Silvermont/Airmont
214.It 214.It
215x86 Intel Goldmont 215x86 Intel Goldmont
216.It 216.It
217x86 Intel Goldmont Plus 217x86 Intel Goldmont Plus
218.El 218.El
219.Sh DIAGNOSTICS 219.Sh DIAGNOSTICS
220The 220The
221.Nm 221.Nm
222utility reports the following statistics about the activities of the 222utility reports the following statistics about the activities of the
223.Nm tprof 223.Nm tprof
224pseudo driver. 224pseudo driver.

cvs diff -r1.15 -r1.16 src/usr.sbin/tprof/arch/tprof_x86.c (expand / switch to unified diff)

--- src/usr.sbin/tprof/arch/tprof_x86.c 2022/12/08 05:29:27 1.15
+++ src/usr.sbin/tprof/arch/tprof_x86.c 2023/04/10 06:08:56 1.16
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tprof_x86.c,v 1.15 2022/12/08 05:29:27 msaitoh Exp $ */ 1/* $NetBSD: tprof_x86.c,v 1.16 2023/04/10 06:08:56 msaitoh Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2018-2019 The NetBSD Foundation, Inc. 4 * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Maxime Villard. 8 * by Maxime Villard.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -561,26 +561,28 @@ init_intel_generic(void) @@ -561,26 +561,28 @@ init_intel_generic(void)
561 table->next = init_intel_silvermont_airmont(); 561 table->next = init_intel_silvermont_airmont();
562 break; 562 break;
563 case 0x5c: /* Goldmont (Apollo Lake) */ 563 case 0x5c: /* Goldmont (Apollo Lake) */
564 case 0x5f: /* Goldmont (Denverton) */ 564 case 0x5f: /* Goldmont (Denverton) */
565 table->next = init_intel_goldmont(); 565 table->next = init_intel_goldmont();
566 break; 566 break;
567 case 0x7a: /* Goldmont Plus (Gemini Lake) */ 567 case 0x7a: /* Goldmont Plus (Gemini Lake) */
568 table->next = init_intel_goldmontplus(); 568 table->next = init_intel_goldmontplus();
569 break; 569 break;
570 case 0x4e: /* Skylake */ 570 case 0x4e: /* Skylake */
571 case 0x5e: /* Skylake */ 571 case 0x5e: /* Skylake */
572 case 0x8e: /* Kabylake */ 572 case 0x8e: /* Kabylake */
573 case 0x9e: /* Kabylake */ 573 case 0x9e: /* Kabylake */
 574 case 0xa5: /* Cometlake */
 575 case 0xa6: /* Cometlake */
574 table->next = init_intel_skylake_kabylake(); 576 table->next = init_intel_skylake_kabylake();
575 break; 577 break;
576 } 578 }
577 } 579 }
578 580
579 return table; 581 return table;
580} 582}
581 583
582/* ------------------------------------------------------------------------- */ 584/* ------------------------------------------------------------------------- */
583 585
584/* 586/*
585 * AMD Family 10h 587 * AMD Family 10h
586 */ 588 */