Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell profiling for a fixed amount of time

I am currently trying to profile a Haskell server. The server runs forever, so I just want a profiling report for a fixed amount of time. I tried just running the program for 3 minutes, and then politely ask it to terminate, but somehow the haskell profiler doesn't obey the term signal, and generates incomplete data.

My first attempt:

timeout --signal SIGTERM 3m ./actionsDemo +RTC -hc -RTS -p -K100M

Anyone any idea how to neatly profile this server?

like image 955
windwarrior Avatar asked Jan 11 '14 17:01

windwarrior


1 Answers

The methods for getting a heap profile of a running program are well documented here, section 5.5.3. In short, you just need to remove the last "incomplete" sample, and then proceed as usual.

There's also a relevant trac ticket to make hp2ps handle this on its own, but it doesn't seem to be ready yet.

For time/allocation profiling, I don't have an answer.

like image 55
crockeea Avatar answered Nov 11 '22 08:11

crockeea