freebsd-dev/share/examples/perfmon
Bruce Evans 9018a5cb58 Implemented `-c command'.
Fixed bitrot (__dead went away; EOF is now wrong for the getopt failure
value).

Moved sleep command to the end of the main loop to avoid mismatch between
main loop and the report loop.  There is an extra iteration that could be
used to calibrate the loop overhead, but was used to report wrong results.

Fixed usage message.
1997-06-29 22:43:01 +00:00
..
Makefile
perfmon.c Implemented `-c command'. 1997-06-29 22:43:01 +00:00
README

`perfmon' is a sample program to access the performance-monitoring
counters on Pentium and Pentium Pro CPUs.  See perfmon(4) for a
description of this facility.

The program takes the following options:

	-u	count events in user mode
	-o	count events in kernel mode
		(these two can be combined)

	-e	count events, not duration
	-l n	run `n' loops (default 50)
	-s n	sleep `n' seconds between loop iterations (default 0)

The following options are not implemented on Pentium CPUs:

	-m n	use count mask `n'
	-i	invert sense of count mask comparison
	-U n	use unit mask `n'

There is one mandatory argument, which must be the number of the counter.
All numbers can be specified in any format acceptable to strtol(3).

$Id$