Recent versions of the perfctr package don't work with my version of perfex. However, they include a perfex program (which works a little differently from this version, both internally, and user-visibly), so I probably won't update my version of perfex.
Name Last modified Size Description
Parent Directory -
pentium4 09-Apr-2003 19:45 2.3K
perfex.tar.gz 03-Dec-2000 13:36 2.7K
ppc7450.html 17-Dec-2004 12:12 12K
Linux Perfex Linux perfex runs another program (similar to time) and reports the resulting performance counter values. Its command-line interface is a simplified version of IRIX' perfex. Requirements ------------ You need a Linux kernel with Mikael Pettersson's performance counter patches (http://www.csd.uu.se/~mikpe/linux/perfctr/). This program has been tested with perfctr-1.6. Building and Installing ----------------------- make PERFDIR=/usr/src/perfctr-1.6 make install PREFIX=/usr/local The values for the variables given above are the defaults, so if they are ok for you, you don't need to specify them. Usage ----- perfex [-e event] ... command command-options You have to specify the event selectors in hex. The event selectors values and the number of counters are processor-dependent. E.g., the Athlon/Duron has four performance counters; the event selectors are specified in the "AMD Athlon Processor x86 Code Optimization Guide" (http://www.amd.com/products/cpg/athlon/techdocs/pdf/22007.pdf), p. 235-238. As an example, the following line measures the number of retired instructions in user and in system mode, and the number of branches and taken branches in both modes on an Athlon: perfex -e 4100c0 -e 4200c0 -e 4300c2 -e 4300c4 latex bench The output looks like this: tsc : 2311704289 event 004100c0: 1928896018 event 004200c0: 9244180 event 004300c2: 382690877 event 004300c4: 291798134 Availability ------------ You may find information on newer versions of Linux perfex on http://www.complang.tuwien.ac.at/anton/linux-perfex. Related Work ------------ lperfex (http://www.osc.edu/~troy/lperfex/) is P6-specific and based on a different kernel patch, but more featureful. Licensing --------- Copyright (C) 1999-2000 Mikael Pettersson <mikpe@csd.uu.se> Copyright (C) 2000 Anton Ertl <anton@mips.complang.tuwien.ac.at> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA