[Haskell-cafe] GHC Heap Profiler time axis

Anton Dessiatov anton.dessiatov at gmail.com
Fri Dec 19 15:46:04 UTC 2014


Hello, Haskell-Cafe!

For the last 2 days I’m debugging something that looks like a space leak. My program is a rather long-running network service. When I first used heap profiler I was a bit confused with its output that showed that my program was running for only about 0.3-0.4 seconds when I launched it idling for about a minute.

That was confusing enough for me to dig into GHC sources trying to figure out the reason behind this and I found that values of the sample times are taken from the mut_user_time function, which returns a time that process spent in user-mode code (outside the kernel) minus time spent on garbage collection. 

This introduces great amount of unpredictable non-linearity of the heap profile graph x axis, which I personally consider very counterintuitive.

So my question is does anybody know why is it done this way? Wouldn’t it be better if x axis would just show a time elapsed since the process started?

Kind regards,
  Anton.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141219/824b0357/attachment.html>


More information about the Haskell-Cafe mailing list