ghc-debug is a debugging tool for performing precise heap analysis of Haskell
programs (check out our previous post introducing). While
working on Eras, we
took the opportunity to make some much needed improvements and quality of life
fixes to both the ghc-debug library and the
https://hackage.haskell.org/package/ghc-debug-brick
terminal user interface.

To summarise,

  • ghc-debug now works seamlessly with profiled executables.
  • The ghc-debug-brick UI has been redesigned around a composable, filter
    based workflow.
  • Cost centers and other profiling metadata can now be inspected
    using both the library interface and the TUI.
  • More analysis modes have been integrated into the terminal interface such
    as the 2-level profile.

This post explores the changes and the new possibilities for inspecting the
heap of Haskell processes that they enable. These changes are available by
using the 0.6.0.0 version of
https://hackage.haskell.org/package/ghc-debug-stub and
https://hackage.haskell.org/package/ghc-debug-brick-0.6.0.0.