[erlang-questions] : fprof unusable?

Raimo Niskanen raimo+erlang-questions@REDACTED
Mon Aug 25 13:08:50 CEST 2008


On Fri, Aug 22, 2008 at 06:04:43PM -0500, Scott Lystig Fritchie wrote:
> Joel Reymont <joelr1@REDACTED> wrote:
> 
> jr> Any suggestions on how to proceed other than shortening the
> jr> profiling session?

Nope.
See below.

> 
> Joel, I haven't had much luck with using fprof for 100%-CPU-eating
> workloads for more than 30-60 seconds.  In versions up through R11B-5,
> occasionally I see fprof:analyse() crash after chugging through some
> fraction of the trace file.  {shrug}  I haven't used R12B-* enough to
> say anything useful.
> 
> Even R12B releases are going to create gigantic trace files like that if
> you run for a couple of days, it's the nature of the fprof beast, as far
> as I know.
> 
> I very frequently use eprof or even cprof first, to get an idea of where
> to start looking, then try to devise a short (time-wise) and small (# of
> Erlang processes-wise) that ought to do the same thing, then use fprof
> on that.  The problem is that the "try to devise..." step isn't always
> feasible, but that's a case-by-case thing.  {shrug}
> 

Very good advice, indeed!

Fprof takes so much CPU load that it is nothing to use on
a heavily loaded system other than a not too heavily loaded
system under a very short time.

It is in the nature of the "trace all analyse later" approach
fprof has to use.

I have since long thought about some way to augument the call trace
with information of whether the call was tail recursive or not,
but when the trace point is reached, that information is lost.

But any dirty trick would do, I have just not got one yet.

> -Scott
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list