[patch,RFC,CFT] debloat du #1

Denys Vlasenko vda.linux at googlemail.com
Mon Sep 3 12:48:45 PDT 2007


On Saturday 01 September 2007 21:09, Bernhard Fischer wrote:
> Hi,
> 
> I have this patch lying around for some months now..
> Ideally, du would reuse recursive_action, but the attached patch only
> does the non-intrusive (i.e. i didn't rewrite it, which would have been
> saner, perhaps) part 1/2, that is switch to globals and debloat the logic
> a little bit. This patch does not move the whole applet to
> recursive_action as of now (i will not do this anytime soon, so feel
> free to do this yourself, or rewrite it completely).
> 
> The reason why i didn't apply it outright is that i did not really test
> it (just a little bit, and it worked for me, but hey).
> 
> vda, please apply if you think it's worthwile, or, even better, rewrite
> the whole mess to use recursive_action right from the start..
> 
> Also, i didn't record any stats, size(1)-wise, so better double-check if
> it makes sense in the first place.. :-/

   text    data     bss     dec     hex filename
    864      12      28     904     388 busybox.t3/coreutils/du.o
    867       0       0     867     363 busybox.t4/coreutils/du.o

function                                             old     new   delta
du_main                                              340     348      +8
print                                                 39      40      +1
status                                               129     125      -4
slink_depth                                            4       -      -4
print_files                                            4       -      -4
one_file_system                                        4       -      -4
max_print_depth                                        4       -      -4
du_depth                                               4       -      -4
disp_hr                                                4       -      -4
count_hardlinks                                        4       -      -4
du                                                   407     401      -6
dir_dev                                                8       -      -8
------------------------------------------------------------------------------
(add/remove: 0/8 grow/shrink: 2/2 up/down: 9/-46)             Total: -37 bytes

Applied, thanks.
--
vda


More information about the busybox mailing list