Commit Graph

38 Commits

Author SHA1 Message Date
wiz 6595bf8f10 Sort sections. Fix macro usage. 2017-07-13 10:59:53 +00:00
maxv 138795e97b Update. 2017-07-12 17:38:15 +00:00
maxv 25d629d753 Properly handle overflows, and take them into account in userland. 2017-07-12 17:33:29 +00:00
maxv e0e9462ba4 Build the pmc tool on amd64. 2017-07-12 17:10:09 +00:00
maxv fb196e084a Check argc, and add a message. 2017-06-14 17:54:01 +00:00
maxv 68bac86bd0 Drop support for 586 PMCs; the detection is broken, and I'm not sure the
code even works. No one has ever cared about this anyway, and we won't
maintain it.

While here, fix the mask on the counter - K7 and F10H have 48bit counters.
2017-03-24 18:30:44 +00:00
maxv 8e6373a0b2 Add the AMD 10h family, with additional events that I believe are useful,
the DTLB misses on large pages for example.

While here, remove a few K7 flags that do not actually exist on K7 (there
must have been a confusion between K7 and K8); and make the 'pmc list'
command a little more user-friendly.
2017-03-11 10:33:46 +00:00
wiz 2c8e0836c2 Sort sections. Remove unnecessary/incorrect macros. 2017-03-10 15:34:17 +00:00
maxv 92ee76edc0 PRIu64 2017-03-10 15:06:20 +00:00
maxv 65d7f88d0e Switch to per-CPU PMC results, and completely rewrite the pmc(1) tool. Now
the PMCs are system-wide, fine-grained and more tunable by the user.

We don't do application tracking, since it would require to store the PMC
values in mdproc and starting/stopping the counters on each context switch.
While this doesn't seem to be particularly difficult to achieve, I don't
think it is really interesting; and if someone really wants to measure
the performance of an application, they can simply schedctl it to a cpu
and look at the PMC results for this cpu.

Note that several options are implemented but not yet used.
2017-03-10 13:09:11 +00:00
maxv 279ed0db08 Add a version argument, set to 1, and check it in usr.bin/pmc. Use uint32_t
instead uint8_t since we now need 12bit selectors (10h family). And while
here KNF.
2017-03-08 16:42:27 +00:00
maxv 0446600dd7 We don't use libi386 anymore. 2017-03-08 16:05:29 +00:00
maxv 03b4ea3bfc KNF, and make it less i386-specific. 2017-02-18 16:48:38 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
lukem af17a5d8f3 fix -Wsign-compare issues 2009-01-18 07:05:53 +00:00
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
christos b9cc3c0e19 - add volatile
- fix an missing initializer.
2006-10-22 16:25:19 +00:00
christos e90cb419e0 Coverity CID 2355: Checking event for NULL is supefluous; restructure the
code to make this obvious.
2006-04-09 18:57:10 +00:00
christos 347d6ce9be Pass lint. Also fix errx/err confusion. 2006-04-09 18:54:28 +00:00
lukem 458eb38666 Improve argument error checking.
Detected with -Wuninitialized.
2005-06-02 02:14:58 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
agc a8d6388e6f Add NetBSD RCS Ids. 2003-06-23 13:05:47 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
yamt 729dff3dfb fix coredump when "command" is omitted. 2002-10-16 10:40:17 +00:00
grant be8ae688ae New sentence, new line. 2002-09-30 11:08:56 +00:00
gmcgarry 074387420c Some more Athlon counter names. 2002-06-07 05:26:45 +00:00
gmcgarry 009583c02c Athlon support. 2002-06-07 04:07:08 +00:00
gmcgarry f44a386b6f Support i586 counters. 2002-06-07 01:38:17 +00:00
gmcgarry 83e2c9f2a8 Add a DIAGNOSTIC section to clarify potential problems. 2002-06-06 21:32:37 +00:00
gmcgarry 616df6150d The most likely failure of i386_pmc_info() is that the kernel doesn't
include PMC support.  Report this to the user to give a clue as to
why pmc(1) doesn't work.
2002-06-06 21:20:42 +00:00
ross 8bd7cb6a69 Edit -mdoc usage.
* There is no -indent option to .Bd or .Bl, although you would
  never know that from its frequent use in this tree. There is a
  "-offset indent" combination that makes sense, and you can certainly
  say "-width indent".

* Also, you can't markup the -width option argument, tho you CAN
  use a callable macro. So "-width Ar filename" doesn't make sense,
  but either "-width Ar" or "-width filename" does, as might something
  like "-width xxfilename" for a little extra space.

* There are a lot of needlessly complex hanging tag macros in man4 used
  to create simple item lists. Those should be simplified one of these
  days before someone copies and edits yet another man4 page.
2002-02-07 03:15:06 +00:00
briggs 6b6638f488 Due to a typo, the kernel and user counters were getting swapped. Make
sure that they are not, so kernel events are reported as kernel events,
and user events are reported as user events.
2002-01-03 05:04:52 +00:00
thorpej 5d537fa0b9 Need <string.h> for memset() and strcmp() prototypes (noticed by
gcc 3.1).
2001-12-31 18:38:32 +00:00
wiz 48a36de9c0 Don't give .Os an argument, not even 'NetBSD' (default includes version). 2001-06-05 10:08:03 +00:00
cgd c2bdafab79 use getprogname() 2001-02-20 23:51:59 +00:00
thorpej a74afa60d2 A program for reading performance counters for execution of
a command.  From Frank van der Linden <fvdl@wasabisystems.com>.
2000-10-24 23:54:31 +00:00