|
|
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:
$ 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: travel.play: 2193665 Jump Percentage: 26.6 Line Usage Efficiency before tuning: 50.6 Line Usage Efficiency after tuning: 67.6After 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.$ fur -f block.all.o.00,block.all.o.00 all.o $ cc -o travel all.o