On 31/10/2009 18:27, Henry DeYoung wrote:
Hi,

I am working with another grad student on a course project on cache
behavior of GHC programs.  The first part of this project is to reproduce
some of the measurements from Nethercote and Mycroft's "The Cache Behavior
of Large Lazy Functional Programs on Stock Hardware".

We've decided to use oprofile to sample cache misses recorded by the
performance counters.  To get reasonable information out of oprofile, I'd
like to compile the nofib benchmarks via C with export of debugging
symbols.

As a first step toward this, I've changed the NoFibHcOpts variable in
nofib/mk/boilerplate.mk to be:

     NoFibHcOpts = -O -fvia-C -pgmc gcc -optc-g

That won't work, I'm afraid. The Evil Mangler script that post-processes the .s file output by gcc does not understand the debug annotations added by gcc's -g flag.

The best you can do with oprofile is get assembly-level profiling. It's not too bad actually; I've used it in the past myself, although oprofile itself I found to be a bit flaky - for some reason it seems to stop counting randomly on my laptop.

You might have better luck using the new performance counter support ("performance events") in Linux 2.6.31. I've not been able to test it yet myself because apparently it doesn't support the CPU in my laptop, but I plan to find another machine to try it on soon.

Cheers,
        Simon
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to