Age | Commit message (Collapse) | Author |
|
function old new delta
fflush_stdout_and_exit_SUCCESS - 7 +7
xxd_main 890 888 -2
vlock_main 353 351 -2
uuencode_main 318 316 -2
uniq_main 427 425 -2
uname_main 250 248 -2
sort_main 853 851 -2
shuf_main 500 498 -2
route_main 238 236 -2
readlink_main 113 111 -2
nice_main 156 154 -2
last_main 957 955 -2
ipcs_main 960 958 -2
env_main 209 207 -2
chrt_main 464 462 -2
cal_main 921 919 -2
baseNUM_main 650 648 -2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 7/-32) Total: -25 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
PLATFORM_LINUX is a hidden configuration option which is disabled by
default and enabled at over a hundred locations for features that are
deemed to be Linux specific.
The only effect of PLATFORM_LINUX is to control compilation of
libbb/match_fstype.c. This file is only needed by mount and umount.
Remove all references to PLATFORM_LINUX and compile match_fstype.c
if mount or umount is enabled.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by
Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower
overhead call to bb_perror_msg() when only a string was being printed
with no parameters. This saves space for some CPU architectures because
it avoids the overhead of a call to a variadic function. However there
has never been a simple version of bb_error_msg(), and since 2007 many
new calls to bb_perror_msg() have been added that only take a single
parameter and so could have been using bb_simple_perror_message().
This changeset introduces 'simple' versions of bb_info_msg(),
bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and
bb_herror_msg_and_die(), and replaces all calls that only take a
single parameter, or use something like ("%s", arg), with calls to the
corresponding 'simple' version.
Since it is likely that single parameter calls to the variadic functions
may be accidentally reintroduced in the future a new debugging config
option WARN_SIMPLE_MSG has been introduced. This uses some macro magic
which will cause any such calls to generate a warning, but this is
turned off by default to avoid use of the unpleasant macros in normal
circumstances.
This is a large changeset due to the number of calls that have been
replaced. The only files that contain changes other than simple
substitution of function calls are libbb.h, libbb/herror_msg.c,
libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c,
networking/udhcp/common.h and util-linux/mdev.c additonal macros have
been added for logging so that single parameter and multiple parameter
logging variants exist.
The amount of space saved varies considerably by architecture, and was
found to be as follows (for 'defconfig' using GCC 7.4):
Arm: -92 bytes
MIPS: -52 bytes
PPC: -1836 bytes
x86_64: -938 bytes
Note that for the MIPS architecture only an exception had to be made
disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h)
because it made these files larger on MIPS.
Signed-off-by: James Byrne <james.byrne@origamienergy.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
packed_usage 32543 32547 +4
ipcs_main 1014 980 -34
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-34) Total: -30 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
packed_usage 32539 32543 +4
format 1 - -1
do_shm 883 880 -3
do_sem 636 633 -3
do_msg 782 779 -3
ipcs_main 1049 1014 -35
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/4 up/down: 4/-45) Total: -41 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Those two spaces after tab have no effect, and always a nuisance when editing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
print_linkinfo - 815 +815
do_msg - 783 +783
INET_setroute - 757 +757
varvalue - 746 +746
do_sem - 637 +637
inflate_codes - 617 +617
INET6_setroute - 491 +491
edir - 370 +370
sync_cursor - 298 +298
update_utmp - 246 +246
searchLines - 165 +165
setup_alarm - 144 +144
may_wakeup - 101 +101
getNum 566 371 -195
refresh 1166 848 -318
rtcwake_main 809 479 -330
getty_main 2396 1921 -475
chpst_main 1373 746 -627
inflate_unzip_internal 1335 567 -768
evalvar 1384 612 -772
ipaddr_list_or_flush 2160 1246 -914
route_main 1585 245 -1340
ipcs_main 2523 1049 -1474
------------------------------------------------------------------------------
(add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213) Total: -1043 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
expand_vars_to_list - 2118 +2118
lzo1x_optimize - 1429 +1429
run_pipe 358 1775 +1417
arith_apply - 1335 +1335
mainQSort3 - 1198 +1198
logdir_open - 1163 +1163
rewrite - 1039 +1039
dump_identity - 987 +987
do_shm - 884 +884
cpio_o - 863 +863
cpio_main 1450 560 -890
ipcs_main 3442 2523 -919
bb_dump_dump 2611 1488 -1123
process_dev 4572 3405 -1167
logdirs_reopen 1308 86 -1222
arith 2084 707 -1377
mainSort 2622 1202 -1420
do_lzo_compress 2276 799 -1477
run_list 2491 943 -1548
expand_variables 2280 135 -2145
------------------------------------------------------------------------------
(add/remove: 9/0 grow/shrink: 1/10 up/down: 12433/-13288) Total: -855 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
|
|
function old new delta
procps_scan 1265 1298 +33
aliascmd 278 283 +5
parse_file_cmd 116 120 +4
dname_enc 373 377 +4
setcmd 90 93 +3
execcmd 57 60 +3
count_lines 72 74 +2
process_command_subs 340 339 -1
test_main 409 407 -2
mknod_main 179 177 -2
handle_incoming_and_exit 2653 2651 -2
argstr 1312 1310 -2
shiftcmd 131 128 -3
exitcmd 46 43 -3
dotcmd 297 294 -3
breakcmd 86 83 -3
evalpipe 353 349 -4
evalcommand 1180 1176 -4
evalcmd 109 105 -4
send_tree 374 369 -5
mkfifo_main 82 77 -5
evalsubshell 152 147 -5
typecmd 75 69 -6
letcmd 61 55 -6
add_cmd 1190 1183 -7
main 891 883 -8
ash_main 1415 1407 -8
parse_stream 1377 1367 -10
alloc_procps_scan 55 - -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes
text data bss dec hex filename
797195 658 7428 805281 c49a1 busybox_old
797101 658 7428 805187 c4943 busybox_unstripped
|
|
add_cmd 1189 1190 +1
xconnect_ftpdata 118 117 -1
data_align 86 84 -2
process_files 2101 2096 -5
forkexec 1345 1334 -11
|
|
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
|
|
|
|
|
|
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
text data bss dec hex filename
773469 1058 11092 785619 bfcd3 busybox_old
772644 1058 11092 784794 bf99a busybox_unstripped
|
|
(add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228) Total: -89 bytes
|
|
*: s/include "busybox.h"/include "libbb.h"
|
|
|
|
no preceding prototype
|
|
|
|
|
|
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
|
|
|
|
|
|
|
|
|
|
Various fixes, cleanups and shrinkage:
saves 952 Bytes:
text data bss dec hex filename
1087742 15853 790632 1894227 1ce753 ../busybox/busybox.old
1086790 15853 790632 1893275 1ce39b busybox
via:
# scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped
function old new delta
ipcrm_main 756 822 +66
getval - 61 +61
maybe_set_utc - 40 +40
udhcpc_main 2896 2912 +16
md5_hash_block 428 437 +9
opt 8 16 +8
qgravechar 106 110 +4
make_bitmap 292 295 +3
inflate_unzip 2056 2059 +3
add_partition 1412 1414 +2
__parsespent 156 158 +2
qrealloc 41 42 +1
format - 1 +1
catv_main 313 314 +1
watch_main 293 292 -1
varunset 81 80 -1
part 1 - -1
check_if_skip 837 836 -1
start_stop_daemon_main 840 837 -3
create_lost_and_found 175 172 -3
supress_non_delimited_lines 4 - -4
static.l 4 - -4
static.c 5 1 -4
bsd_sum_file 237 233 -4
eval2 338 332 -6
arithmetic_common 166 158 -8
cmpfunc 22 5 -17
cksum_main 294 275 -19
cmp_main 465 439 -26
dd_main 1535 1508 -27
rmmod_main 376 333 -43
cut_file 727 644 -83
ipcs_main 3809 3721 -88
cut_main 722 614 -108
date_main 1443 1263 -180
remove_ids 222 - -222
------------------------------------------------------------------------------
(add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853) Total: -636 bytes
|
|
|
|
about comparing signed and unsigned and make stuff static.
text data bss dec hex filename
6944 0 0 6944 1b20 util-linux/ipcs.o.oorig
6509 0 0 6509 196d util-linux/ipcs.o
TODO: bb_getopt_ulflags, and further simplifications
|
|
|
|
|
|
some more work to shrink them down.
|