[CMI.PM] Re: Perl Debugger and finding CPU Usage

Arun Bhalla bhalla at uiuc.edu
Fri Nov 7 21:35:43 CST 2003


Well, I think now it's time to look at the code.  I've never seen Net::RTP
before.  It looks like rtp_recv is either inefficient or is being
used incorrectly.  Perhap you can look through the Net::RTP code and
figure out what's going on.

You could use a line-level profiler like Devel::SmallProf to see which lines
are getting called the most or take the longest.  This may or may not
help you.  One major note is that SmallProf will slow down the execution
of your program, so you can expect the runtime to be much longer than usual.

Arun



Mitch Kutzko writes:
> Hi again -- Ok, here's output collected for a bit more than 36 minutes,
> using the -r and -I options.
> 
> Does anything here leap right out and grab anybody as particularly
> meaningful?  It appears this is just telling me where the script spends its
> time, and not so much about how much CPU is being used in various places.
> I *know* where it spends its time -- I just don't know why it's using so
> much CPU.
> 
> Thoughts?
> 
> Mitch
> 
> 
> --------------------------------
> 
> Total Elapsed Time = 2202.757 Seconds
>          User Time = 2202.757 Seconds
> Inclusive Times
> %Time ExclSec CumulS #Calls sec/call Csec/c  Name
>  63.4   0.510 1398.5      1   0.5100 1398.5  main::rxtx_loop
>  60.7   1171. 1337.9  44955   0.0261 0.0298  Net::RTP::rtp_recv
>  7.63   41.93 168.06 445634   0.0001 0.0004  main::rtp_event_handler
>  4.08   89.96 89.960  44105   0.0020 0.0020  Net::RTP::rtp_free_rtp_packet
>  1.66   35.30 36.500    770   0.0458 0.0474  Net::RTP::rtp_send_ctrl
>  1.00   3.750 21.950  44105   0.0001 0.0005  main::receive_tcp_reports
>  0.90   19.53 19.830  44185   0.0004 0.0004  Net::RTP::rtp_update
>  0.81   2.200 17.770  44719   0.0000 0.0004  IO::Socket::accept
>  0.71   2.870 15.610  44734   0.0001 0.0003  IO::Socket::INET::new
>  0.58   3.330 12.740  44734   0.0001 0.0003  IO::Socket::new
>  0.23   1.910  5.060  44734   0.0000 0.0001  IO::Handle::autoflush
>  0.17   1.300  3.670  44734   0.0000 0.0001  IO::Handle::new
>  0.16   3.420  3.420 445634   0.0000 0.0000  Net::RTP::rtp_event_type_get
>  0.13   2.860  2.860 363428   0.0000 0.0000  Net::RTP::rtp_get_rr
>  0.12   2.340  2.660  44734   0.0001 0.0001  SelectSaver::new
> 
> --
> 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
> 

--
Arun Bhalla



More information about the Champaign-Urbana mailing list