Analyzing run-time behavior

Analyzing the results of the experiment

Since block profiles are not intended to be read by programmers, the procedure for analyzing them is quite simple.

Block profiles are passed to fur using the -f option. You can choose to do 3 different things with the profile:

Remember, the logs correspond to the original object not the one with the profiling code inserted, so after running your experiment, you need to relink your
code (or just save it the first time). In this example, we will assume that travel was run twice:
   $ ld -r -o all.o travel.o misc.o
   $ fur -r -v -f block.all.o.00,block.all.o.00 all.o
    [ Lots of output showing blocks and amount of times they were run ]
   $ fur -r -m -f block.all.o.00,block.all.o.00 all.o
     Maximum executed function: 2193665
     Jump Percentage: 26.6
     Line Usage Efficiency before tuning: 50.6
     Line Usage Efficiency after tuning: 67.6

$ fur -f block.all.o.00,block.all.o.00 all.o $ cc -o travel all.o

After relinking to produce all.o, first we viewed the log. Then, we examined how much tuning helps the code (it will have 26.6% of the jumps after tuning and it will use cache 17% more efficiently). These are good numbers (it is hard to increase the Line Usage Efficiency much at all). Then, finally, we reordered all.o to match this data and relinked the program.
Next topic: Improving program performance by programmer analysis
Previous topic: Running the experiment

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004