trace of method calls

trace of method calls

am 28.11.2007 11:00:18 von avilella

Hi,

I would like to trace all the method calls for a script. What is the
best module people would recommend for this?

Cheers,

Albert.

Re: trace of method calls

am 28.11.2007 11:14:04 von Spiros Denaxas

On Nov 28, 10:00 am, "avile...@gmail.com" wrote:
> Hi,
>
> I would like to trace all the method calls for a script. What is the
> best module people would recommend for this?
>
> Cheers,
>
> Albert.

Hi Albert,

I would use the Perl debugger for this.

perl -d script.pl

tracing is available with 'T' and it toggled with 't'.

Run 'perldoc perldebtut' for more info.

Addionally, I believe the Perl profiler has a similar output support.
Have a look at:

http://search.cpan.org/~nwclark/perl-5.8.6/utils/dprofpp.PL
and
http://search.cpan.org/perldoc?Devel::DProf

hope this helps,
Spiros

Re: trace of method calls

am 28.11.2007 11:22:43 von bugbear

avilella@gmail.com wrote:
> Hi,
>
> I would like to trace all the method calls for a script. What is the
> best module people would recommend for this?

Dynamically, or statically?

BugBear

Re: trace of method calls

am 28.11.2007 11:50:22 von avilella

On Nov 28, 10:22 am, bugbear
wrote:
> avile...@gmail.com wrote:
> > Hi,
>
> > I would like to trace all the method calls for a script. What is the
> > best module people would recommend for this?
>
> Dynamically, or statically?
>
> BugBear

I think what I want is statically. I can use breakpoints and "T", but
I rather want to run the script completely and then have a debug file
with all the method calls.

Re: trace of method calls

am 28.11.2007 14:50:06 von bugbear

avilella@gmail.com wrote:
> On Nov 28, 10:22 am, bugbear
> wrote:
>> avile...@gmail.com wrote:
>>> Hi,
>>> I would like to trace all the method calls for a script. What is the
>>> best module people would recommend for this?
>> Dynamically, or statically?
>>
>> BugBear
>
> I think what I want is statically. I can use breakpoints and "T", but
> I rather want to run the script completely and then have a debug file
> with all the method calls.

That's "dynamic".

BugBear

Re: trace of method calls

am 28.11.2007 16:12:01 von avilella

On Nov 28, 1:50 pm, bugbear wrote:
> avile...@gmail.com wrote:
> > On Nov 28, 10:22 am, bugbear
> > wrote:
> >> avile...@gmail.com wrote:
> >>> Hi,
> >>> I would like to trace all the method calls for a script. What is the
> >>> best module people would recommend for this?
> >> Dynamically, or statically?
>
> >> BugBear
>
> > I think what I want is statically. I can use breakpoints and "T", but
> > I rather want to run the script completely and then have a debug file
> > with all the method calls.
>
> That's "dynamic".
>
> BugBear

oh, ok, dynamic then :-)

Anyone?

Re: trace of method calls

am 28.11.2007 17:23:35 von Spiros Denaxas

On Nov 28, 3:12 pm, "avile...@gmail.com" wrote:
> On Nov 28, 1:50 pm, bugbear wrote:
>
>
>
> > avile...@gmail.com wrote:
> > > On Nov 28, 10:22 am, bugbear
> > > wrote:
> > >> avile...@gmail.com wrote:
> > >>> Hi,
> > >>> I would like to trace all the method calls for a script. What is the
> > >>> best module people would recommend for this?
> > >> Dynamically, or statically?
>
> > >> BugBear
>
> > > I think what I want is statically. I can use breakpoints and "T", but
> > > I rather want to run the script completely and then have a debug file
> > > with all the method calls.
>
> > That's "dynamic".
>
> > BugBear
>
> oh, ok, dynamic then :-)
>
> Anyone?

Hi,

then use the Perl profiler and analyze its output with dprofpp.

from the manpage:

-T Display subroutine call tree to stdout. Subroutine
statistics are
not displayed.

-t Display subroutine call tree to stdout. Subroutine
statistics are
not displayed. When a function is called multiple
consecutive
times at the same calling level then it is displayed once
with a
repeat count.

Hope this helps,

Spiros