The NetBSD Project

CVS log for src/usr.sbin/tprof/arch/tprof_x86.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.sbin / tprof / arch

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.8.4.3 / (download) - annotate - [select for diffs], Tue Aug 1 17:34:32 2023 UTC (7 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.8.4.2: +784 -322 lines
Diff to previous 1.8.4.2 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.11 (colored)

Pull up the following revisions, requested by msaitoh in ticket #1697:

	usr.sbin/tprof/tprof.8				1.16,1.22,1.25,1.29 via patch
	usr.sbin/tprof/tprof_analyze.c			1.4
	usr.sbin/tprof/arch/tprof_x86.c 		1.13-1.19
	sys/dev/tprof/tprof.c				1.23 via patch
	sys/dev/tprof/tprof_x86_amd.c			1.7-1.8 via patch
	sys/dev/tprof/tprof_x86_intel.c 		1.8 via patch

- Add AMD family 19h (zen3 and zen4) support.
- Add Intel Comet Lake support.
- Add support for Intel Skylake-X and Cascade Lake.
- Print the path that we failed to open on error.
- Use lowercase consistently for hexadecimal numbers.
- KNF

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Sat Jul 29 11:07:17 2023 UTC (8 months ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.15.2.1: +279 -5 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored) to selected 1.11 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #255):

	usr.sbin/tprof/arch/tprof_x86.c: revision 1.18
	usr.sbin/tprof/arch/tprof_x86.c: revision 1.19

Modify comment. No functional change.

tprof(8): Add support for Skylake-X and Cascade Lake.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jul 7 04:43:15 2023 UTC (8 months, 3 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.18: +275 -1 lines
Diff to previous 1.18 (colored) to selected 1.11 (colored)

tprof(8): Add support for Skylake-X and Cascade Lake.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jul 7 04:37:03 2023 UTC (8 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.17: +5 -5 lines
Diff to previous 1.17 (colored) to selected 1.11 (colored)

Modify comment. No functional change.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 22:34:51 2023 UTC (9 months, 1 week ago) by martin
Branch: netbsd-10
Changes since 1.15: +6 -3 lines
Diff to previous 1.15 (colored) to selected 1.11 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #210):

	usr.sbin/tprof/tprof.8: revision 1.30
	sys/dev/tprof/tprof_x86_amd.c: revision 1.8
	sys/dev/tprof/tprof_armv8.c: revision 1.20
	sys/dev/tprof/tprof_types.h: revision 1.7
	sys/dev/tprof/tprof_x86_intel.c: revision 1.6
	sys/dev/tprof/tprof_x86_intel.c: revision 1.7
	sys/dev/tprof/tprof_x86_intel.c: revision 1.8
	sys/dev/tprof/tprof.c: revision 1.23
	usr.sbin/tprof/tprof.8: revision 1.25
	usr.sbin/tprof/tprof.8: revision 1.26
	usr.sbin/tprof/arch/tprof_x86.c: revision 1.16
	usr.sbin/tprof/tprof.8: revision 1.27
	usr.sbin/tprof/arch/tprof_x86.c: revision 1.17
	usr.sbin/tprof/tprof.8: revision 1.28
	usr.sbin/tprof/tprof.h: revision 1.5
	usr.sbin/tprof/tprof.8: revision 1.29
	sys/dev/tprof/tprof_armv7.c: revision 1.13
	usr.sbin/tprof/tprof_top.c: revision 1.9
	usr.sbin/tprof/tprof.c: revision 1.21

Add Cometlake support.

Obtain the number of general counters from CPUID 0xa.

Test cpuid_level in tprof_intel_ncounters().
This function is called before tprof_intel_ident().

KNF. No functional change.

Add two note to the tprof(8)'s manual page.
 - "list" command prints the maximum number of counters that can be used
   simultaneously.
 - multiple -e arguments can be specified.

Use the default counter if -e argument is not specified.
 monitor command:
     The default counter is selected if -e argument is not specified.
 list command:
     Print the name of the default counter for monitor and top command.

tprof.8: new sentence, new line

tprof(8): fix markup nits

tprof.8: fix typo, s/speficied/specified/

Revision 1.17 / (download) - annotate - [select for diffs], Wed Apr 12 02:15:51 2023 UTC (11 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.16: +4 -3 lines
Diff to previous 1.16 (colored) to selected 1.11 (colored)

KNF. No functional change.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Apr 10 06:08:56 2023 UTC (11 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.15: +3 -1 lines
Diff to previous 1.15 (colored) to selected 1.11 (colored)

Add Cometlake support.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Dec 8 05:29:27 2022 UTC (15 months, 2 weeks ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.14: +183 -1 lines
Diff to previous 1.14 (colored) to selected 1.11 (colored)

Add AMD family 19h (zen3 and zen4) support to tprof.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 8 02:12:18 2022 UTC (15 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.13: +263 -263 lines
Diff to previous 1.13 (colored) to selected 1.11 (colored)

Use lowercase consistently for hexadecimal numbers. No functional change.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 7 08:11:49 2022 UTC (15 months, 3 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.12: +148 -145 lines
Diff to previous 1.12 (colored) to selected 1.11 (colored)

KNF. No functional change.

Revision 1.8.4.2 / (download) - annotate - [select for diffs], Sat Oct 15 10:20:32 2022 UTC (17 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.8.4.1: +13 -4 lines
Diff to previous 1.8.4.1 (colored) to branchpoint 1.8 (colored) to selected 1.11 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1543):

	sys/dev/tprof/tprof_x86_intel.c: revision 1.4
	usr.sbin/tprof/arch/tprof_x86.c: revision 1.10
	usr.sbin/tprof/arch/tprof_x86.c: revision 1.11
	usr.sbin/tprof/arch/tprof_x86.c: revision 1.12

Fix typo in a comment.

Use CPUID_PERF_* macros defined in specialreg.h. No functional change.

Add topdown-slots to Intel architectural performance monitoring version 1.

Disable the unsupported events from the bit vector length in EAX.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jun 13 09:28:58 2022 UTC (21 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.11: +11 -3 lines
Diff to previous 1.11 (colored)

Disable the unsupported events from the bit vector length in EAX.

Revision 1.11 / (download) - annotate - [selected], Mon Jun 13 07:40:58 2022 UTC (21 months, 2 weeks ago) by msaitoh
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

Add topdown-slots to Intel architectural performance monitoring version 1.

Revision 1.8.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:48 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.8.2.3: +1 -1 lines
Diff to previous 1.8.2.3 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.11 (colored)

Sync with HEAD

Revision 1.10 / (download) - annotate - [select for diffs], Fri Apr 17 03:15:50 2020 UTC (3 years, 11 months ago) by knakahara
Branch: MAIN
CVS Tags: phil-wifi-20200421, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored) to selected 1.11 (colored)

Fix typo in a comment.

Revision 1.8.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:06:06 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.8.2.2: +117 -1 lines
Diff to previous 1.8.2.2 (colored) to branchpoint 1.8 (colored) to selected 1.11 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.8.4.1 / (download) - annotate - [select for diffs], Sat Oct 12 14:34:45 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.8: +117 -1 lines
Diff to previous 1.8 (colored) to selected 1.11 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #301):

	usr.sbin/tprof/tprof.8: revision 1.15
	sys/dev/tprof/tprof_x86_amd.c: revision 1.5
	usr.sbin/tprof/arch/tprof_x86.c: revision 1.9

Match Family 15h

 -

Add support for AMD Family 15h

 -

Add AMD Family 15h to supported model list

Revision 1.9 / (download) - annotate - [select for diffs], Fri Oct 11 18:05:52 2019 UTC (4 years, 5 months ago) by jmcneill
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp
Changes since 1.8: +117 -1 lines
Diff to previous 1.8 (colored) to selected 1.11 (colored)

Add support for AMD Family 15h

Revision 1.8.2.2 / (download) - annotate - [select for diffs], Mon Jun 10 22:10:43 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.8.2.1: +798 -0 lines
Diff to previous 1.8.2.1 (colored) to branchpoint 1.8 (colored) to selected 1.11 (colored)

Sync with HEAD

Revision 1.8.2.1, Wed May 29 17:09:18 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.8: +0 -798 lines
FILE REMOVED

file tprof_x86.c was added on branch phil-wifi on 2019-06-10 22:10:43 +0000

Revision 1.8 / (download) - annotate - [select for diffs], Wed May 29 17:09:18 2019 UTC (4 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base
Branch point for: phil-wifi, netbsd-9
Changes since 1.7: +56 -8 lines
Diff to previous 1.7 (colored) to selected 1.11 (colored)

Add support for AMD Family 17h.

Revision 1.4.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:12 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.4.2.3: +153 -1 lines
Diff to previous 1.4.2.3 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.11 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 26 23:20:57 2018 UTC (5 years, 4 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.6: +43 -1 lines
Diff to previous 1.6 (colored) to selected 1.11 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Mon Nov 26 07:45:47 2018 UTC (5 years, 4 months ago) by knakahara
Branch: MAIN
Changes since 1.5: +111 -1 lines
Diff to previous 1.5 (colored) to selected 1.11 (colored)

tprof: Add goldmont support.

I tested on Atom C3558 (Denverton).

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:59 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.4.2.2: +96 -1 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored) to selected 1.11 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.5 / (download) - annotate - [select for diffs], Thu Nov 15 07:20:31 2018 UTC (5 years, 4 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.4: +96 -1 lines
Diff to previous 1.4 (colored) to selected 1.11 (colored)

tprof: Add silvermont, airmont support.

I tested on Atom C2758 (Rangeley).

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:15 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.4.2.1: +503 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) to selected 1.11 (colored)

Sync with HEAD

Revision 1.4.2.1, Sat Jul 14 07:54:04 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.4: +0 -503 lines
FILE REMOVED

file tprof_x86.c was added on branch pgoyette-compat on 2018-07-28 04:38:15 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jul 14 07:54:04 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Branch point for: pgoyette-compat
Changes since 1.3: +148 -3 lines
Diff to previous 1.3 (colored) to selected 1.11 (colored)

Finish the Skylake/Kabylake table, and improve the output of "tprof analyze".

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jul 13 09:53:42 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.2: +10 -9 lines
Diff to previous 1.2 (colored) to selected 1.11 (colored)

Skylake/Kabylake are family 6, so add a check for that. While here improve
the layout of "tprof list".

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jul 13 08:09:21 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.1: +70 -71 lines
Diff to previous 1.1 (colored) to selected 1.11 (colored)

Inline the values in amd_f10h_names[], we're not going to use defines for
each CPU model found in the wild.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jul 13 07:56:29 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Diff to selected 1.11 (colored)

Revamp tprof.

Rewrite the Intel backend to use the generic PMC interface, which is
available on all Intel CPUs. Synchronize the AMD backend with the new
interface.

The kernel identifies the PMC interface, and gives its id to userland.
Userland then queries the events itself (via cpuid etc). These events
depend on the PMC interface.

The tprof utility is rewritten to allow the user to choose which event
to count (which was not possible until now, the event was hardcoded in
the backend). The command line format is based on usr.bin/pmc, eg:

	tprof -e llc-misses:k -o output sleep 20

The man page is updated too, but the arguments will likely change soon
anyway so it doesn't matter a lot.

The tprof utility has three tables:

	Intel Architectural Version 1
	Intel Skylake/Kabylake
	AMD Family 10h

A CPU can support a combination of tables. For example Kabylake has
Intel-Architectural-Version-1 and its own Intel-Kabylake table.

For now the Intel Skylake/Kabylake table contains only one event, just
to demonstrate that the combination of tables works. Tested on an
Intel Core i5 Kabylake.

The code for AMD Family 10h is taken from the code I had written for
usr.bin/pmc. I haven't tested it yet, but it's the same as pmc(1), so
I guess it works as-is.

The whole thing is written in such a way that (I think) it is not
complicated to add more CPU models, and more architectures (other than
x86).

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>