Age | Commit message (Collapse) | Author |
|
function old new delta
mmap_anon - 22 +22
mmap_read - 21 +21
xmmap_anon - 16 +16
rpm_gettags 465 447 -18
bb_full_fd_action 498 480 -18
uevent_main 337 310 -27
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 0/3 up/down: 59/-63) Total: -4 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
packages
function old new delta
unpack_xz_stream 2309 2317 +8
bb_full_fd_action 464 472 +8
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>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Busybox already uses sendfile in httpd. This patch proposes to use it
globally to copy data between file descriptors.
It speeds up the copying on slow systems a lot - below are the times needed
to copy a 450Mb file with and without this option enabled on a BeagleBone
Black:
sendfile:
user 0m0.000s
sys 0m8.170s
read/write 4k:
user 0m0.470s
sys 0m16.300s
function old new delta
bb_full_fd_action 394 474 +80
Signed-off-by: Bartosz Golaszewski <bartekgola@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>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bb_copyfd_exact_size 51 98 +47
bb_full_fd_action 362 394 +32
get_header_tar 1546 1558 +12
data_extract_to_command 430 439 +9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 100/0) Total: 100 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bb_full_fd_action 283 295 +12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
|
|
|
|
People who want smaller stack at any cost may use it
to reduce cp's stack usage (FEATURE_COPYBUF_KB=1).
Desktop people may get faster copy of big files
(FEATURE_COPYBUF_KB=32 is ~30% faster than 4kb)
|
|
cat: stop using stdio.h opens
libbb: introduce & use open[3]_or_warn
function old new delta
open3_or_warn - 54 +54
bb_cat 115 144 +29
open_or_warn - 25 +25
unlzma 2404 2412 +8
chattr_main 334 339 +5
xstrtoul_range_sfx 251 255 +4
telnet_main 1514 1510 -4
static.opt 4 - -4
qgravechar 122 118 -4
fuser_add_pid 61 54 -7
fuser_add_inode 154 147 -7
writeFileToTarball 1542 1534 -8
refresh 1156 1148 -8
do_show 856 846 -10
read_leases 212 200 -12
setup_redirects 236 222 -14
iproute_list_or_flush 1582 1568 -14
read_config 427 411 -16
write_leases 284 264 -20
hash_file 338 318 -20
copy_file 1760 1740 -20
do_iproute 2610 2588 -22
bb_full_fd_action 320 269 -51
open_to_or_warn 103 49 -54
fuser_main 1660 1596 -64
.rodata 131160 131096 -64
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
|
|
rename sllep_and_die -> xfunc_die
make fflush_stdout_and_exit NOFORK-safe
fix some buglets found by randomconfig
|
|
Put big scary warnings in relevant places.
|
|
use it for making NOFORK more practical.
touch: make it a NOFORK applet
|
|
|
|
(we have bb_copyfd_exact_size now for that kind of usage)
|
|
bb_full_fd_action: optimize
die_if_ferror: "<applet>: filename" isn't a good err msg, add "..I/O error"
|
|
|
|
|
|
|
|
xlseek and fdlength() for the new mkswap.
|
|
- include the correct headers: applets need busybox.h while lib* need libbb.h
|
|
definitions. (That should only be on prototypes.)
|
|
echo > foo && zip foo.zip foo && ./busybox unzip foo.zip
|
|
|
|
|
|
on file sizes between 2 and 4 gigs on 32 bit machines. For supporting >4 gigs,
just use a 64 bit machine already...)
|
|
chunk of data when they get it and not block until they've buffered 4k.
The use case was cat /proc/psaux, but you can also reproduce this by
running non-busybox cat by itself and typing things at the command line.
Then run busybox cat. Notice how cat is _supposed_ to echo each line back
to us as we hit enter?
|
|
|
|
fixing bug http://bugs.uclibc.org/view.php?id=231
|
|
|
|
|
|
major breaking.
|
|
it seemed like a good idea at the time.
|
|
reading untill eof which breaks tar
|
|
|
|
archive_xread can be replaced with bb_full_read, and archive_copy_file
with bb_copyfd*
bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof,
they share a common backend.
|
|
|
|
|
|
|
|
-Erik
|
|
|
|
(used by cat, grep, sed, etc) quite a bit faster.
|