[CMI.PM] Perl Debugger and finding CPU Usage

Sigfried Gold sigfried at ojctech.com
Fri Nov 7 15:53:20 CST 2003


i've done this.  the perl profiler is pretty easy to use.

from perldoc perldebug:

          The Perl Profiler

          If you wish to supply an alternative debugger for Perl to
          run, just invoke your script with a colon and a package
          argument given to the -d flag.  The most popular alternative
          debuggers for Perl is the Perl profiler.  Devel::DProf is
          now included with the standard Perl distribution.  To
          profile your Perl program in the file mycode.pl, just type:

              $ perl -d:DProf mycode.pl

          When the script terminates the profiler will dump the
          profile information to a file called tmon.out.  A tool like
          dprofpp, also supplied with the standard Perl distribution,
          can be used to interpret the information in that profile.

* Mitch Kutzko <mitch at ncsa.uiuc.edu> :
> Hi, folks -- I have a question about the Perl debugger, which I've
> essentially never actually used.
> 
> How do I go about using it to find out where CPU usage is occurring?  I've
> got a very large, very complex script that's soaking up *way* too much CPU
> (but not leaking memory -- already checked for that) for what it's doing,
> but I can't figure out where/how it's happening.
> 
> Any ideas on how to get the debugger to show me where all the CPU is going?
> 
> Mitch
> --
> Mitch Kutzko | mitch at dast.nlanr.net | mitch at ncsa.uiuc.edu | 217-333-1199
> http://hobbes.ncsa.uiuc.edu/
> _______________________________________________
> Champaign-Urbana mailing list
> Champaign-Urbana at mail.pm.org
> http://mail.pm.org/mailman/listinfo/champaign-urbana

-- 
Sigfried Gold
Home: 212-568-3549
Cell: 718-781-6991
Work: 212-304-7210
http://www.sigfried.org
mailto:sigfried at sigfried.org



More information about the Champaign-Urbana mailing list