[ ... ]
> 429 page_fault 26.8125
> 1581 unplug_device 32.9375
> 3417 nfs_lookup_cache_refresh 35.5938
> 20189 wd_block_output 114.7102
No, you're off the mark here. You're reading the output of readprofile
wrong. That floating point number is actually the number of counts,
divided by the size of the routine, which produces a number, but
probably isn't a very useful number (at least, I couldn't think of a
use for it. :)
What you want is the use a script something like the one
below. Basically, you sort on the number of counts, and then generate
percentages from that. I call this munch, and it as './munch | tail
-20' to find my top 20 users of CPU time. It's a junky hack, but gives
you some numbers that actually mean a bit.
#! /bin/sh
./readprofile -p $1 -m ./System.map -v | sort -n +2 > /tmp/rp.out
perl -e 'open S, "/tmp/rp.out";
while (<S>) { split; $sum += $_[2]; }
close S; open S, "/tmp/rp.out";
while (<S>) {
chop; split; printf "$_\t%.2f\n", ($_[2]/$sum * 100);
}'
Michael.