Performance Measurement with PerfMon
Perfmon is available directly from the HP website http://www.hpl.hp.com/research/linux/perfmon/ (which is also the best place to find out about the tool).
There are two components: perfmon itself (which is a part of the kernel), and libpfm, the user space access functions to the kernel code.
If you use debian, then packages for libfpm2 are available in Unstable; libpfm3 isn't there yet, but we're expecting it soon.
There are examples in /usr/share/doc/libpfm/examples after you have installed libpfm-dev.
There are three ways to use perfmon without modifying your code:
If you're running on a McKinley machine, then configure your 2.6 kernel not to use CONFIG_IA64_PAL_IDLE because if you do, you wont see any samples.
- If you are seeing an error like
too many events specified, max=0
then you need to make sure you have CONFIG_IA64_PALINFO selected in your kernel .config. This is via the /proc/pal support option under Processor type and features
i2prof.pl is a script which makes it very easy to run a particular program and measure many interesting statistics by asking natural language questions. See the ia64-profiling.txt file for more information. It is released under a BSD style license, and there is a mirrored copy attached to this page for redundancy (though check out the link first for the most up to date version).