The NetBSD Project

CVS log for src/usr.sbin/tprof/tprof.8

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.14.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 1 17:34:32 2023 UTC (16 months, 1 week ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.14.2.1: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.2.1: +10 -6 lines
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.24.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 22:34:51 2023 UTC (17 months, 2 weeks ago) by martin
Branches: 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
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +80 -48 lines
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.30: download - view: text, markup, annotated - select for diffs
Tue Apr 18 00:21:23 2023 UTC (19 months, 3 weeks ago) by gutteridge
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -2 lines
tprof.8: fix typo, s/speficied/specified/

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Apr 17 21:51:40 2023 UTC (19 months, 3 weeks ago) by uwe
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +62 -44 lines
tprof(8): fix markup nits

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Apr 17 21:46:12 2023 UTC (19 months, 3 weeks ago) by gutteridge
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -2 lines
tprof.8: new sentence, new line

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Apr 17 08:37:24 2023 UTC (19 months, 3 weeks ago) by msaitoh
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +7 -3 lines
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.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Apr 17 07:13:35 2023 UTC (19 months, 3 weeks ago) by msaitoh
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +12 -3 lines
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.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Apr 10 06:08:55 2023 UTC (20 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -3 lines
Add Cometlake support.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Dec 16 08:02:04 2022 UTC (23 months, 3 weeks ago) by ryo
Branches: MAIN
CVS tags: netbsd-10-base
Branch point for: netbsd-10
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +15 -15 lines
the "scale" option can be specified in the event name even in "tprof monitor"

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Dec 16 08:00:47 2022 UTC (23 months, 3 weeks ago) by ryo
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -2 lines
- added 'c' command to tprof-top to show/hide event counter.
- column widths were not calculated correctly and sometimes displayed incorrectly.
- use putp() for terminfo str.
- fix build error with llvm.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Dec 9 01:59:51 2022 UTC (2 years ago) by ryo
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -1 lines
supported AMD family added

Revision 1.21: download - view: text, markup, annotated - select for diffs
Fri Dec 9 01:56:40 2022 UTC (2 years ago) by ryo
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +16 -1 lines
mainly fixes around display.

- use terminfo
- dynamically adjust column widths
- mode can be changed while running

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Dec 9 01:55:46 2022 UTC (2 years ago) by ryo
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +10 -5 lines
add accumulative mode. "tprof top -a"

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Dec 1 00:43:27 2022 UTC (2 years ago) by ryo
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +34 -1 lines
add "top" subcommand to tprof(8)

Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Dec 1 00:40:05 2022 UTC (2 years ago) by ryo
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +16 -3 lines
Improve tprof(8)

- Added "tprof count" subcommand to perform counts only.
- Event options (u,k) are now optional. The default value is both userland and kernel. (:uk)
- Event counters can be displayed with SIGINFO during `tprof monitor' or `tprof count'.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Dec 1 00:32:52 2022 UTC (2 years ago) by ryo
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -2 lines
Improve tprof(4)

- Multiple events can now be handled simultaneously.
- Counters should be configured with TPROF_IOC_CONFIGURE_EVENT in advance,
  instead of being configured at TPROF_IOC_START.
- The configured counters can be started and stopped repeatedly by
  PROF_IOC_START/TPROF_IOC_STOP.
- The value of the performance counter can be obtained at any timing as a 64bit
  value with TPROF_IOC_GETCOUNTS.
- Backend common parts are handled in tprof.c as much as possible, and functions
  on the tprof_backend side have been reimplemented to be more primitive.
- The reset value of counter overflows for profiling can now be adjusted.
  It is calculated by default from the CPU clock (speed of cycle counter) and
  TPROF_HZ, but for some events the value may be too large to be sufficient for
  profiling. The event counter can be specified as a ratio to the default or as
  an absolute value when configuring the event counter.
- Due to overall changes, API and ABI have been changed. TPROF_VERSION and
  TPROF_BACKEND_VERSION were updated.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed May 25 06:17:19 2022 UTC (2 years, 6 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -1 lines
Add note about tprof(4) for people like me who forget to load tprof_x86.

Revision 1.3.42.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:06:06 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.3.42.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.42.1: +4 -2 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.14.2.1: download - view: text, markup, annotated - select for diffs
Sat Oct 12 14:34:45 2019 UTC (5 years, 1 month ago) by martin
Branches: 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
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -2 lines
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.15: download - view: text, markup, annotated - select for diffs
Fri Oct 11 20:18:20 2019 UTC (5 years, 2 months ago) by jmcneill
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -2 lines
Add AMD Family 15h to supported model list

Revision 1.3.42.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:10:43 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +96 -35 lines
Sync with HEAD

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed May 29 17:09:17 2019 UTC (5 years, 6 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base
Branch point for: netbsd-9
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -3 lines
Add support for AMD Family 17h.

Revision 1.3.40.3: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:02:12 2018 UTC (5 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.3.40.2: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.40.2: +6 -2 lines
Sync with HEAD, resolve a few conflicts

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Nov 26 23:20:56 2018 UTC (6 years ago) by knakahara
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -2 lines
tprof: Add goldmont plus support. Tested by msaitoh@n.o, thanks.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Nov 26 07:45:47 2018 UTC (6 years ago) by knakahara
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -2 lines
tprof: Add goldmont support.

I tested on Atom C3558 (Denverton).

Revision 1.3.40.2: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:59 2018 UTC (6 years ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.3.40.1: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.40.1: +4 -2 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Nov 20 06:43:26 2018 UTC (6 years ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-1126
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -2 lines
Note support for Intel Silvermont/Airmont.

Revision 1.3.40.1: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:38:15 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +87 -34 lines
Sync with HEAD

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Jul 24 10:05:36 2018 UTC (6 years, 4 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +16 -2 lines
Add a "support" section.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jul 18 16:50:05 2018 UTC (6 years, 4 months ago) by wiz
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +6 -8 lines
Various improvements to man page. Sync usage.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jul 13 12:04:50 2018 UTC (6 years, 4 months ago) by maxv
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +6 -4 lines
Ask for a file path with the "analyze" command, instead of reading stdin.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Jul 13 11:14:14 2018 UTC (6 years, 4 months ago) by maxv
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -2 lines
Remove tpfmt(1). Its code was merged into tprof(8).

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jul 13 11:03:36 2018 UTC (6 years, 4 months ago) by maxv
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +33 -1 lines
Merge tpfmt(1) into tprof(8). We want to have access to everything with
only one tool. The code is copied mostly as-is, and the functionality is
available via the "analyze" command.

Eg:
	tprof monitor -e llc-misses:k -o myfile.out sleep 20
	tprof analyze < myfile.out

Will move soon, I don't like the reading via stdin.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Jul 13 09:04:31 2018 UTC (6 years, 4 months ago) by maxv
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +26 -20 lines
Change the arguments of the tprof tool, to match the behavior of pmc(1) and
cpuctl(8). They become:

	tprof list
	tprof monitor -e name:option [-o outfile] command

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Jul 13 07:56:29 2018 UTC (6 years, 4 months ago) by maxv
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +21 -19 lines
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).

Revision 1.3.4.2: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:09:54 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.3.4.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.4.1: +121 -0 lines
sync with head

Revision 1.3.4.1
Fri Dec 9 15:26:48 2011 UTC (13 years ago) by yamt
Branches: yamt-pagecache
FILE REMOVED
Changes since revision 1.3: +0 -121 lines
file tprof.8 was added on branch yamt-pagecache on 2012-04-17 00:09:54 +0000

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Dec 9 15:26:48 2011 UTC (13 years ago) by yamt
Branches: MAIN
CVS tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, phil-wifi, pgoyette-compat
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +12 -6 lines
- add a CAVEATS
- fix a warning

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Nov 26 22:49:37 2011 UTC (13 years ago) by wiz
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +11 -11 lines
Improve wording, sort sections, remove ls(1) escapee.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Nov 26 05:02:44 2011 UTC (13 years ago) by yamt
Branches: MAIN
man page

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>