[erlang-questions] : : fprof doubts

Raimo Niskanen raimo+erlang-questions@REDACTED
Tue Sep 9 09:27:52 CEST 2008


On Wed, Sep 03, 2008 at 02:34:47PM +0200, Raimo Niskanen wrote:
> 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" .
> 

For the record. The OP (Original Poster) had Hipe compiled
the module, and breakpoints can not be set on Hipe compiled
code, hence it can not be traced, and therefore it does
not show up in fprof, well shows up as 'undfined'. Alas.


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list