I have a partial answer.
> --
> 1
> --
> In the readprofile man page load=(# of clk ticks) / (length of the procedure)
>
> What does "length of procedure" means.
My understanding after a quick read of the source is that "length of the
procedure" means the length, in bytes, of the function. For most
architectures, there is not a correlation between lines of code in
assembler and number of executable bytes.
On ARM all instructions are 4 bytes long (not counting "Thumb" style
instruction encoding), but that does not mean 1 line of assembler source
code is equal to 4 bytes worth of instructions.
As far as I can tell, the "length of the procedure" is determined by the
difference between sucessive symbols found in System.map:
.
.
.
c0109414 T sys_fork
c010943c T sys_clone
c0109474 T sys_vfork
c01094a0 T sys_execve
.
.
.
sys_clone(), on my system, is 56 bytes long, including any alignment
padding (0xc0109474-0xc010943c = 56).
> Does that mean the # of ASM lines of
> the procedure code? What is the units of the load. It cannot be %. because
> -----------------------------------------------------------
> 152495 default_idle 3176.9792
> -----------------------------------------------------------
> the above line indicates, more than 100% of times CPU is idle. This cannot
> happen.
It is not a percentage. The value is computed by:
"load" = ticks_attributed_to_the_proc / length_of_proc
>From your example above:
3176.9792 = 152495 / length_of_proc
therefore length_of_proc = 48 bytes. 48 looks reasonable when cross
checked with my x86 system (default_idle() is 52 bytes long on my
system).
> What value of the procedure load is considered to be a potential CPU
> intensive procedure/ high load procedure.
There is no magic number. However, from the readprofile man page, some
likely "high load" candidates could be found by:
readprofile | sort -nr +2 | head -20
Regards,
Andy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/