More Profiling

David Farber dfarber at numenor.com
Wed Sep 26 17:00:09 UTC 2001


i put Scott's profiling instructions on the swiki for posterity:

http://minnow.cc.gatech.edu/squeak/VirtualMachineProfiling

david


At 06:20 AM 9/26/01 -0400, you wrote:
[snip>
>BTW, for those who are interested in how I did it. Install Linux.
>
>For full profiling, including basic block level, compile with options '-g
>-pg -a'. (basic blocks are the parts between branches, so basic-block
>level profiling will tell you each time any conditional is taken. Each
>time a case: in a switch is taken, etc) Basic block profiling slows the
>virtual machine down by about 15%.
>
>If you just want line-level and function level, compile with flags '-g -pg'.
>
>Run it a while, then exit normally. You get two files: gmon.out and bb.out
>
>If you're doing basic-block level profiling, you need to convert bb.out so
>that gprof can use it:
>
># perl /usr/share/doc/binutils/gprof/bbconv.pl < bb.out >bbFOO.out
>
>Then,
># gprof -l -A -x squeak gmon.out bbFOO.out | less
>
>will annotate your source code with number of invocations of any loop,
>conditional, etc.
>
>And, you can always do:
>
># gprof -l squeak gmon.out | less
>
>will give you line level profiling (the second table given above)
>
># gprof squak gmon.out | less
>
>will give you function-level profiling.
>
>
>For more info, read the 'gcc' and 'gprof' texinfo documentation. Do *NOT*
>read the man pages. The manpages are very out of date.
>

--
David Farber
dfarber at numenor.com




More information about the Squeak-dev mailing list