[Haskell-cafe] methods/tools for reading/presenting (time/allocation) profiling information?
olf at aatal-apotheke.de
Fri Nov 26 22:01:06 UTC 2021
> Dear Cafe,
> with +RTS -p -RTS, the resulting .prof file
> shows (in the second part) what the expensive functions are.
> (counting sections as GHC docs do -
> first part gives program name and options)
> Often, that's useful, but sometimes, this info does not surprise me -
> some things just don't have an easy implementation.
> For those, I want to find out who calls them -
> to possibly replace some of these calls
> with a cheaper implementation (that is only valid
> because the caller knows something that the callee does not)
> Is there some automation for getting this information?
> I am not even sure how to formalize what I want.
> Perhaps, for the first N heavy cost centers (SCCs),
> a suitably ordered list of their callers (that inherit the cost)?
> The data is in the third (long, detailed) part of the .prof file
> but I find it hard to process (in that form). It represents
> the call hiearchy by indentation (first column) and adjacency (of rows)
> but this goes out the window as soon as I grep or sort the rows.
> The JSON output format seems the way to go
> Yeah, I should probably just aeson it and then walk the tree.
> I still wanted to ask for advice first, or references
> to existing work. Any pointers appreciated.
> - J.
Profiteur has served me well in this regard.
It shows me what top-level functions eat most of the execution times,
and which sub-functions have the biggest share thereof, etc.
All in a nice interactive browser interface.
More information about the Haskell-Cafe