воскресенье, 29 января 2017 г.

Profiling of Haskell program on Windows

To profile your Haskell application on Windows w/ stack currently (due existing bug?) you must:

C:\prj> stack build --profile
C:\prj> stack exec -- prj-exe --RTS +RTS -p -RTS [other options of app]

This will produce .prof file in current directory. You can add -h and -hy to -p to get info about heap/allocations. To produce .ps file use:

C:\prj> hp2ps -c your-hp-file-name

Then open generated .ps file in SumatraPDF and analize that.. -)