[erlang-questions] : fprof doubts

Raimo Niskanen raimo+erlang-questions@REDACTED
Wed Sep 3 14:34:47 CEST 2008


On Wed, Sep 03, 2008 at 03:45:26PM +0530, Geevarghese Philip wrote:
> On 9/3/08, Raimo Niskanen
> <raimo+erlang-questions@REDACTED<raimo%2Berlang-questions@REDACTED>>
> wrote:
> >
> >
> > > c) In nearly every block of information, there is an entry named
> > "undefined"
> > > with large numbers against it. What does this mean?
> >
> >
> > Can you give an example?
> 
> 
> Here is one:
> 
> {[{undefined, 156757, 7629.458, 997.459},
> {{digraph,out_neighbours,2}, 63, 0.000, 0.368}],
> { {digraph,out_neighbours,2}, 156820, 7629.458, 997.827}, %
> [{{digraph,collect_elems,3}, 156820, 5907.714, 471.786},
> {{ets,lookup,2}, 156820, 660.148, 660.148},
> {garbage_collect, 85, 58.944, 58.944},
> {suspend, 353, 4.233, 0.000},
> {{digraph,in_neighbours,2}, 8, 0.343, 0.044},
> {{lists,dropwhile,2}, 3, 0.218, 0.010},
> {{lists,filter,2}, 1, 0.031, 0.006},
> {{digraph,out_neighbours,2}, 63, 0.000, 0.368}]}.
> 

I see digraph:out_neighbours/2 calls itself and this is 
a typical case where Fprof might get confused since
it can get a hard time figuring out which calls are
tail recursive. Heuristics are used and
sometimes it fails.

> Every module listed above is from the Erlang distribution.
> 
> > Could these be because I have not invoked/named my functions in some
> > > specified manner?
> >
> > Yes, probably. How _did_ you trace?
> 
> 
> At the erl prompt :
> 
> > fprof:apply(graphs_test, test_run, [300, 3, 1, false], [file]).
> 
> > fprof:profile([file, {dump, []}]).
> 
> > fprof:analyse([{dest, []}, totals]).
> 
> 
> Now look at the file "fprof.analysis" .

Can you mail the "fprof.dump" and "fprof.analysis" files
to me, if they are smaller than a Megabyte, or place them
on a web server somewhere and send me the links?

The graphs_test:test_run/4 function should be in the
analysis file.

> 
> 
> Thanks,
> Philip

> _______________________________________________
> 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