Since Linux 2.6.31, linux has had a new performance counter subsystem (initially called "perf counters" and later renamed to "perf events"). The facilities provided by perf events, and the associated tool "perf", are generally a superset of what you can do with oprofile and qprof, so it's a good idea to use perf if you can. It does support fewer processors than the other systems, although more are being added over time.
The perf events subsystem is compiled in by default in the kernel shipped with most distros (e.g. Ubuntu) which means there's no fiddling around compiling your own kernel or modules.
On Debian and Ubuntu you can install "perf" by installing the linux-tools-<your kernel version> package:
which is great for pointing to the hotspots. You can also annotate the source code (of the RTS) or the assembly, using perf annotate.
Perf with NoFib
There is a caveat to using perf on an executable built by the nofib Makefiles.
To more accurately measure changes in binary sizes, nofib strips the symbols out of the final executable. Therefore, the useful names like "stg_ap_p_info" and "s1ql_info" will not show up in the perf report output. IE The following commands will yield information that is difficult to use.
$ cd nofib/your/favorite/test$ make clean; make boot; make NoFibRuns=0 >& log$ perf record ./test <test inputs>$ perf report
One workaround is to find the ghc options used in the log file and invoke ghc <options from log> --make Main.hs -o test directly. The useful symbol names will then show up in the perf report output. NB The symbols are in the .o files that nofib's make generates; only the linking must be done without using the Makefiles.