trace of method calls

Discussion in 'Perl Misc' started by avilella@gmail.com, Nov 28, 2007.

  1. Guest

    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.
     
    , Nov 28, 2007
    #1
    1. Advertising

  2. On Nov 28, 10:00 am, "" <> 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
     
    Spiros Denaxas, Nov 28, 2007
    #2
    1. Advertising

  3. Guest

    On Nov 28, 10:22 am, bugbear <bugbear@trim_papermule.co.uk_trim>
    wrote:
    > 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.
     
    , Nov 28, 2007
    #3
  4. Guest

    On Nov 28, 1:50 pm, bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
    > wrote:
    > > On Nov 28, 10:22 am, bugbear <bugbear@trim_papermule.co.uk_trim>
    > > wrote:
    > >> 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?
     
    , Nov 28, 2007
    #4
  5. On Nov 28, 3:12 pm, "" <> wrote:
    > On Nov 28, 1:50 pm, bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
    >
    >
    >
    > > wrote:
    > > > On Nov 28, 10:22 am, bugbear <bugbear@trim_papermule.co.uk_trim>
    > > > wrote:
    > > >> 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
     
    Spiros Denaxas, Nov 28, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rukmal Fernando
    Replies:
    4
    Views:
    870
    Richard Grimes [MVP]
    Oct 27, 2003
  2. andy6
    Replies:
    2
    Views:
    773
    andy6 via DotNetMonster.com
    Jun 9, 2006
  3. Paul McGuire
    Replies:
    3
    Views:
    539
    Paul McGuire
    Nov 7, 2008
  4. Tool to monitor/trace all method calls?

    , Jul 6, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    231
  5. Tool to monitor/trace all method calls?

    , Jul 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    248
Loading...

Share This Page