Recently we have been working with Hasura towards making call stack profiling possible using
perf and similar tools. For that purpose Andreas Klebinger implemented a prototype branch of GHC which brings us closer to such support.
In this blog post we discuss how we could adapt GHC’s register assignment to make
perf usable on Haskell code, what benefits we could gain from this functionality, as well as the trade-offs associated with the change.
We also request feedback from the Haskell community on these trade-offs. Please let us know if you think this would be a good direction for GHC!
The status quo
The best bet for profiling Haskell programs currently is GHC’s profiling mode.
When it works, this mode works really well. However, it has some pretty big caveats:(read more)