Legend:

[http://icl.cs.utk.edu/papi/ PAPI] is a library providing largely CPU-independent support for performance-counter measurements. We have used it in the past in GHC for doing low-level performance measurements; for example when developing [wiki:Commentary/Rts/HaskellExecution/PointerTagging Pointer Tagging] we used PAPI to measure the number of branch prediction misses.

6

6

7

Nowadays it might be better to use the [wiki:Debugging/LowLevelProfiling/PerfEvents Performance Events] infrastructure in Linux 2.6.31 and later.

7

PAPI versions 3.7.0 and later have support for the Linux Performance Events infrastructure, which means that if your Linux distro ships a kernel with Performance Events compiled in (Ubuntu Karmic does, for example), then don't have to recompile a kernel to use PAPI (big win!).

8

8

9

For some notes on installing PAPI on Linux, see [wiki:Debugging/LowLevelProfiling/PAPI/Installing].

9

For some notes on installing PAPI on Linux (including recompiling the kernel), see [wiki:Debugging/LowLevelProfiling/PAPI/Installing].