Age | Commit message (Collapse) | Author |
|
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>
|
|
function old new delta
fgetc_interactive 261 258 -3
pseudo_exec_argv 406 399 -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-10) Total: -10 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
refill_HFILE_and_getc 88 170 +82
fgetc_interactive 226 250 +24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 106/0) Total: 106 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
It made ^C break out of the entire shell, if we aren't in PS2 mode.
Need a better idea.
function old new delta
expand_one_var 2344 2353 +9
syntax_error_unterm_ch 21 29 +8
parse_dollar 817 824 +7
parse_stream 2251 2238 -13
fgetc_interactive 249 227 -22
syntax_error_unterm_str 26 - -26
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 3/2 up/down: 24/-61) Total: -37 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
expand_one_var 2344 2353 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
wait_for_child_or_signal 213 214 +1
refill_HFILE_and_getc 89 88 -1
getstatus 97 96 -1
builtin_wait 339 337 -2
checkjobs 187 183 -4
process_wait_result 450 444 -6
waitcmd 290 281 -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 1/-23) Total: -22 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
xc_read_line 324 353 +29
free_line_input_t 34 39 +5
xc_vm_init 656 640 -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-16) Total: 18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
expand_one_var 2323 2344 +21
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
hush_main 1151 1147 -4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
run_applet_main - 20 +20
builtin_kill 296 288 -8
builtin_test 19 10 -9
builtin_printf 19 10 -9
builtin_echo 19 10 -9
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/4 up/down: 20/-35) Total: -15 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
hush_main 1101 1151 +50
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
hush_main 1759 1766 +7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
hush_main 1763 1759 -4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
text data bss dec hex filename
1021988 559 5052 1027599 fae0f busybox_old
1021236 559 5052 1026847 fab1f busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
syntax_error_unterm_str - 26 +26
parse_stream 2238 2251 +13
fgetc_interactive 243 249 +6
parse_dollar 824 817 -7
syntax_error_unterm_ch 29 21 -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 45/-15) Total: 30 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Still rather rudimentary for ash
function old new delta
binop 433 589 +156
check_operator 65 101 +36
done_word 736 769 +33
test_main 405 418 +13
parse_stream 2227 2238 +11
ops_texts 124 133 +9
ops_table 80 86 +6
run_pipe 1557 1562 +5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/0 up/down: 269/0) Total: 269 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This significantly syncronises ash-signals and hush-signals tests.
function old new delta
process_wait_result 449 450 +1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
process_wait_result 438 449 +11
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>
|
|
show_history() checks that its argument in non-null so there's
no need to repeat the test at call sites.
function old new delta
historycmd 25 17 -8
builtin_history 29 21 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-16) Total: -16 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
expand_vars_to_list 1026 1082 +56
parse_dollar 810 811 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 57/0) Total: 57 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
check_and_run_traps 276 278 +2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
check_and_run_traps 259 276 +17
builtin_exit 42 53 +11
hush_main 1086 1096 +10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 38/0) Total: 38 bytes
Fixes exitcode_trap2.tests.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
builtin_return 47 67 +20
check_and_run_traps 243 259 +16
run_pipe 1583 1597 +14
hush_main 1076 1086 +10
run_list 1054 1055 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 61/0) Total: 61 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
complete_cmd_dir_file 678 830 +152
get_builtin_name - 35 +35
optschanged 125 132 +7
hush_main 1069 1076 +7
save_command_ps_at_cur_history 76 78 +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 203/0) Total: 203 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
restore_redirects 52 95 +43
save_fd_on_redirect 243 253 +10
hfopen 90 99 +9
fgetc_interactive 259 261 +2
builtin_type 117 115 -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 64/-2) Total: 62 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.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
options 552 599 +47
expand_one_var 2375 2385 +10
optletters_optnames 60 64 +4
hush_main 1108 1111 +3
ash_main 1150 1152 +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 66/0) Total: 66 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
expand_one_var 2362 2375 +13
hush_main 1104 1108 +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 17/0) Total: 17 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
builtin_history 16 20 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
expand_one_var 2311 2362 +51
hush_main 1075 1104 +29
parse_dollar 790 791 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 81/0) Total: 81 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
"env - hush SCRIPT" invocation (that is, with empty environment)
should not show PS1/2 in "set" output.
function old new delta
hush_main 1070 1075 +5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
"env - hush" invocation (that is, with empty environment)
should not show LINENO in "set" output.
function old new delta
get_local_var_value 263 294 +31
hush_main 1105 1070 -35
handle_changed_special_names 79 38 -41
run_pipe 1834 1765 -69
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 31/-145) Total: -114 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Assignments / exports / unsets of variables are far more frequent than
prompt printing, and if we show prompt, we are likely to be limited by
user typing speed - do not optimize for that scenario.
Just re-query $PS1 / $PS2 values when need to show the prompt.
function old new delta
fgetc_interactive 236 259 +23
set_vars_and_save_old 150 147 -3
pseudo_exec_argv 597 594 -3
hush_main 1110 1105 -5
enter_var_nest_level 38 32 -6
builtin_local 56 50 -6
run_pipe 1857 1834 -23
leave_var_nest_level 127 98 -29
handle_changed_special_names 111 79 -32
cmdedit_update_prompt 57 - -57
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/8 up/down: 23/-164) Total: -141 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
expand_one_var 2296 2311 +15
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
helper_export_local 215 253 +38
leave_var_nest_level 107 127 +20
run_pipe 1840 1857 +17
handle_changed_special_names 101 105 +4
shell_builtin_read 1399 1398 -1
done_word 767 766 -1
parse_stream 2249 2245 -4
set_local_var 437 430 -7
is_well_formed_var_name 66 - -66
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/4 up/down: 79/-79) Total: 0 bytes
text data bss dec hex filename
952376 485 7296 960157 ea69d busybox_old
952400 485 7296 960181 ea6b5 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Bash 5.0 added the dynamic variable EPOCHSECONDS and EPOCHREALTIME
which return the number of seconds since the Unix Epoch as an
integer or float. These are useful for logging or tracing.
function old new delta
get_local_var_value 207 302 +95
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 95/0) Total: 95 bytes
text data bss dec hex filename
938702 4203 1888 944793 e6a99 busybox_old
938797 4203 1888 944888 e6af8 busybox_unstripped
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
checkjobs 163 183 +20
process_wait_result 449 463 +14
leave_var_nest_level 98 107 +9
enter_var_nest_level 32 38 +6
set_vars_and_save_old 147 150 +3
builtin_local 53 56 +3
builtin_wait 322 323 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 7/0 up/down: 56/0) Total: 56 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|