* readprofile ; Meaning of "Length of procedure"
@ 2003-04-14 22:17 Shesha
2003-04-14 22:46 ` Andy Pfiffer
0 siblings, 1 reply; 5+ messages in thread
From: Shesha @ 2003-04-14 22:17 UTC (permalink / raw)
To: linux-kernel, kernelnewbies
Hello Linux ppl,
I have copuple of questions, I request you to share the information if you
know ....
--
1
--
In the readprofile man page load=(# of clk ticks) / (length of the procedure)
What does "length of procedure" means. 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.
--
2
--
What value of the procedure load is considered to be a potential CPU
intensive procedure/ high load procedure.
Say for example, if the load value is 20, then is that procedure considered to
be a high load procedure.
Thanking You
Shesha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: readprofile ; Meaning of "Length of procedure"
2003-04-14 22:17 readprofile ; Meaning of "Length of procedure" Shesha
@ 2003-04-14 22:46 ` Andy Pfiffer
2003-04-14 23:23 ` Shesha
0 siblings, 1 reply; 5+ messages in thread
From: Andy Pfiffer @ 2003-04-14 22:46 UTC (permalink / raw)
To: Shesha; +Cc: linux-kernel, kernelnewbies
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: readprofile ; Meaning of "Length of procedure"
2003-04-14 22:46 ` Andy Pfiffer
@ 2003-04-14 23:23 ` Shesha
2003-04-14 23:39 ` Andy Pfiffer
0 siblings, 1 reply; 5+ messages in thread
From: Shesha @ 2003-04-14 23:23 UTC (permalink / raw)
To: Andy Pfiffer; +Cc: linux-kernel, kernelnewbies
Thanks a lot Andy, one this that is bothering me is,
Say if the load of procedures by executing the command mentioned by you is as
follows in descending order....
2604 __geneic_copy_to_user 40.6875
1705 csum_patrial_copy_generic 6.8750
370 __generic_copy_from_user 3.75
764 do_annonymous_page 3.1754
176 handle_IRQ_event 1.5714
31 remove_wait_queue 0.96
the list goes on
are these procedures condidered as load on the CPU? how much of a load ?
very high, high, moderate .....
If you can throw some light on this, it will be great.
Thanking You
Shesha
On Mon, 14 Apr 2003, Andy Pfiffer wrote:
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: readprofile ; Meaning of "Length of procedure"
2003-04-14 23:23 ` Shesha
@ 2003-04-14 23:39 ` Andy Pfiffer
0 siblings, 0 replies; 5+ messages in thread
From: Andy Pfiffer @ 2003-04-14 23:39 UTC (permalink / raw)
To: Shesha; +Cc: linux-kernel, kernelnewbies
On Mon, 2003-04-14 at 16:23, Shesha@asu.edu wrote:
> Thanks a lot Andy, one this that is bothering me is,
> Say if the load of procedures by executing the command mentioned by you is as
> follows in descending order....
>
> 2604 __geneic_copy_to_user 40.6875
> 1705 csum_patrial_copy_generic 6.8750
> 370 __generic_copy_from_user 3.75
> 764 do_annonymous_page 3.1754
> 176 handle_IRQ_event 1.5714
> 31 remove_wait_queue 0.96
>
> the list goes on
>
> are these procedures condidered as load on the CPU? how much of a load ?
> very high, high, moderate .....
Based only on the data from the fragment above, your relative percentage
of time spent breaks down like this (I'm using the 1st column):
46% __generic_copy_to_user (2604 / 5650)
30% csum_partial_copy_generic (1705 / 5650)
13% do_anonymous_page (764 / 5650)
6% __generic_copy_from_user (370 / 5650)
Whatever you were doing when you collected this profile, your system was
spending roughly 76% of the time copying data from kernel space to user
space.
I can't tell you why it was doing that; for some applications this may
be expected and normal. I don't find the "load" column all that useful
myself -- others will certainly differ.
Regards,
Andy
^ permalink raw reply [flat|nested] 5+ messages in thread
* readprofile: Meaning of "Length of procedure"
@ 2003-04-14 22:15 Shesha
0 siblings, 0 replies; 5+ messages in thread
From: Shesha @ 2003-04-14 22:15 UTC (permalink / raw)
To: linux-kernel, kernelnewbies
Hello Linux ppl,
I have copuple of questions, I request you to share the information if you
know ....
--
1
--
In the readprofile man page load=(# of clk ticks) / (length of the procedure)
What does "length of procedure" means. 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.
--
2
--
What value of the procedure load is considered to be a potential CPU
intensive procedure/ high load procedure.
Say for example, if the load value is 20, then is that procedure considered to
be a high load procedure.
Thanking You
Shesha
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-04-14 23:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-14 22:17 readprofile ; Meaning of "Length of procedure" Shesha
2003-04-14 22:46 ` Andy Pfiffer
2003-04-14 23:23 ` Shesha
2003-04-14 23:39 ` Andy Pfiffer
-- strict thread matches above, loose matches on Subject: below --
2003-04-14 22:15 readprofile: " Shesha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).