[PATCH] make top.c even smaller #2

Denis Vlasenko vda at ilport.com.ua
Wed Feb 15 14:46:40 UTC 2006


On Wednesday 15 February 2006 11:30, Denis Vlasenko wrote:
> On Tuesday 14 February 2006 15:01, Rob Landley wrote:
> > On Tuesday 14 February 2006 10:15 am, Denis Vlasenko wrote:
> > > Patch gets rid of jiffie-per-sec estimation code,
> > > uses raw jiffies count from /proc/stat
> > > for CPU% calculation.
> > 
> > A nice cleanup, but it collided with Vladimir's patch.  (Apparently, keeping 
> > it inline results in smaller code on gcc 4.0.2.)  Could you respin?
> 
> No problem, especially considering that CPU% calculations
> were not precise enough (sum can get over 100%, not nice).
> 
> Attached top.patch has following changes:
> * CPU% = process[i].ticks/sum(process[i].ticks) * busy_cpu_ticks/total_cpu_ticks

Attached is a small fix for bad cursor position at exit
(was left at the end of last line) + pu_ticks
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: top3.patch
Type: text/x-diff
Size: 1919 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060215/259cb1c3/attachment.bin 


More information about the busybox mailing list