tools for comparing ghc's debug outputs?

Max Bolingbroke batterseapower at hotmail.com
Thu Jul 31 07:42:25 EDT 2008


2008/7/31 Claus Reinke <claus.reinke at talk21.com>:
> What tools are there for facilitating comparisons of ghc's
> debug output? I have reduced a performance problem in my code to a case
> where switching two lines of code doubles
> or halves the performance (the results of those lines are stored
> in record fields that never get used in this reduced example..,
> see ghc trac ticket #2463).
> So it should be easy to take the outputs of -ddump-simpl, etc. for both
> variants and run them through a diff viewer,
> but there are way too many irrelevant differences and details.
>
> I seem to recall someone mentioning a tool for normalizing
> the output of things like -ddump-simpl to make diffs easier
> by reducing irrelevant differences due to gensym-generated
> names. Was that just wishful thinking, or does such a thing exist?-)

I would also find such a tool very useful, but to the best of my
knowledge there's nothing out there yet.

You can get quite far by using the -dsuppress-uniques flag, which
removes irrelevant differences due solely to the unique numbers
assigned to names. However, I've found that diff output from that is
still hard to deal with because GHC reorders functions in the Core
output under some circumstances. I've been meaning to find the time to
try and fix this.

Cheers,
Max


More information about the Glasgow-haskell-users mailing list