fprof - crashing in profile() (was: performance issues)

Raimo Niskanen raimo@REDACTED
Tue May 24 09:58:12 CEST 2005


I am afraid you have ran into a bug in fprof. It has got a hard time
figuring out the call stack from the trace data, and on some rare
occasions it bugs out. If you could try fprof:analyse() from the
latest version (R10B-5, if you have not already done that), it
might work better.

Otherwise try eprof. It does not record the call stack - just
the time within each function not including called functions; 
the fprof 'own' time, but it might be sufficient for your
problem.

1> eprof:start().
2> eprof:start_profiling([self()]).
3> start_my_app_here().
4> eprof:stop_profiling().
5> eprof:analyse().

There is also cprof. It gives just the call count of every
function, but it has the lowest runtime impact of the 
available tools.



nm@REDACTED (Gaspar Chilingarov) writes:

> Vladimir Sekissov wrote:
> > Good day,
> > nm> For the same set of input data i got 5-10 times slower
> > performance, what can
> > nm> be a problem and how should I profile this application ? profiler manual is a
> > nm> little bit messy (for a newcomer :).
> > Try _fprof_. It is very easy to use and has very understandable
> > output.
> > 1> fprof:trace(start).
> > 2> start_my_app_here().
> > 3> fprof:trace(stop).
> > 4> fprof:profile().
> > 5> fprof:analyse([]).
> 
> I got the following error, when tried to process trace file.
> fprof:trace(start) and trace(stop) both return ok. There is enough
> space on the hard drive to hold whole dump.
> <0.41.0> is a pid of my manager process
> 
> 
> ..............
> End of erroneous trace!
> {error,{inconsistent_trace_data,fprof,
>                                  2055,
>                                  [<0.41.0>,
>                                   undefined,
>                                   {1116,870978,912617},
>                                   [[{suspend,{1116,870978,912617}}],
>  [{{gen_server,loop,6},{1116,870978,911532}},
>                                     {{gen_server,handle_msg,6},
>                                      {1116,870978,257240}},
>  {{gen_server,loop,6},{1116,870978,257169}},
>                                     {{gen_server,init_it,6},
>                                      {1116,870978,217601}},
>                                     {{gen,init_it2,7},{1116,870978,214418}},
>                                     {{gen,init_it,7},{1116,870978,214410}}],
>  [{{proc_lib,init_p,5},{1116,870978,214343}}]]]}}
> 
> 
> Any ideas why can it crash?
> 
> 
> 
> -- 
> Gaspar Chilingarov
> System Administrator
> 
> t +37491 419763
> w www.web.am
> e nm@REDACTED

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list