xref: /freebsd/share/examples/perfmon/README (revision 05248206f720394d95c2a7475429311df670a2e9)
18919eed4SGarrett Wollman`perfmon' is a sample program to access the performance-monitoring
28919eed4SGarrett Wollmancounters on Pentium and Pentium Pro CPUs.  See perfmon(4) for a
38919eed4SGarrett Wollmandescription of this facility.
48919eed4SGarrett Wollman
58919eed4SGarrett WollmanThe program takes the following options:
68919eed4SGarrett Wollman
78919eed4SGarrett Wollman	-u	count events in user mode
88919eed4SGarrett Wollman	-o	count events in kernel mode
98919eed4SGarrett Wollman		(these two can be combined)
108919eed4SGarrett Wollman
118919eed4SGarrett Wollman	-e	count events, not duration
128919eed4SGarrett Wollman	-l n	run `n' loops (default 50)
138919eed4SGarrett Wollman	-s n	sleep `n' seconds between loop iterations (default 0)
148919eed4SGarrett Wollman
158919eed4SGarrett WollmanThe following options are not implemented on Pentium CPUs:
168919eed4SGarrett Wollman
178919eed4SGarrett Wollman	-m n	use count mask `n'
188919eed4SGarrett Wollman	-i	invert sense of count mask comparison
198919eed4SGarrett Wollman	-U n	use unit mask `n'
208919eed4SGarrett Wollman
2147a30121SDima DorfmanThere is one mandatory argument, which is the event number to be
2247a30121SDima Dorfmanmonitored, defined in <machine/perfmon.h>.  All numbers can be
2347a30121SDima Dorfmanspecified in any format acceptable to strtol(3).
24