lkml.org 
[lkml]   [2003]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: readprofile ; Meaning of "Length of procedure"
From
Date
On Mon, 2003-04-14 at 15:17, Shesha@asu.edu wrote:
> Hello Linux ppl,
>
> I have copuple of questions, I request you to share the information if you
> know ....

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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.058 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site