home *** CD-ROM | disk | FTP | other *** search
- ----- Begin Forwarded Message -----
-
- >From lisch@sysserver1.mentor.com Mon Aug 12 15:43:00 1991
- Date: Mon, 12 Aug 91 15:44:11 PDT
- From: Ray Lischner <lisch@sysserver1.mentor.com>
- To: petolino@joe.Eng.Sun.COM (Joe Petolino)
- Subject: perl profiler?
-
- >>>>> On 11 Aug 91 22:24:00 GMT, petolino@joe.Eng.Sun.COM (Joe Petolino) said:
- Joe> (Apologies if this has been discussed before)
- Joe> The camel book suggests modifying perldb.pl to implement a profiler. Has
- Joe> anyone done this? Is it available for general use?
-
- I tried to work on one, but it isn't very pretty. I tried to make it
- work with a new switch to perl, -m, but I gave up because it wasn't clear
- to me where Perl exits the program. Instead, make sure your script has
- the line:
-
- &DB'perlprof if defined &DB'perlprof;
-
- where the script exists, e.g., at the end.
-
- I invoke the script as follows:
-
- perl -I/dir/where/the/perlprof/perldb.pl/lives -d script ...
-
- The file "perlmon.out" is created in the working directory that is current
- when the script exits, so watch out for chdir()s in the script.
-
- Then run pprof to get a pretty listing of the information.
-
- I'm not sure what to do with evals, and the measurements add a lot of
- overhead, but the information can still be useful. I have successfully
- used the information to locate bottlenecks. Good luck.
-
- Ray Lischner
-
-
-