Commit Graph

11 Commits

Author SHA1 Message Date
Denys Vlasenko
e52da5570e libbb: auto_string() for efficient handling of temporary malloced stirngs
Use it in libiproute: get rid of one static string buffer.

function                                             old     new   delta
auto_string                                            -      51     +51
ll_index_to_name                                      10      49     +39
buffer_fill_and_print                                169     178      +9
scan_recursive                                       378     380      +2
decode_one_format                                    732     734      +2
cmdputs                                              334     332      -2
static.cur_saved                                       4       1      -3
static.nbuf                                           16       -     -16
printable_string                                      94      57     -37
ll_idx_n2a                                            53       -     -53
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/3 up/down: 103/-111)           Total: -8 bytes
   text	   data	    bss	    dec	    hex	filename
 939880	    992	  17496	 958368	  e9fa0	busybox_old
 939880	    992	  17480	 958352	  e9f90	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-09 17:59:56 +02:00
Denys Vlasenko
d5f1b1bbe0 *: add FAST_FUNC to function ptrs where it makes sense
function                                             old     new   delta
evalcommand                                         1195    1209     +14
testcmd                                                -      10     +10
printfcmd                                              -      10     +10
echocmd                                                -      10     +10
func_exec                                            270     276      +6
echo_dg                                              104     109      +5
store_nlmsg                                           85      89      +4
pseudo_exec_argv                                     195     198      +3
dotcmd                                               287     290      +3
machtime_stream                                       29      31      +2
discard_stream                                        24      26      +2
argstr                                              1299    1301      +2
killcmd                                              108     109      +1
evalfor                                              226     227      +1
daytime_stream                                        43      44      +1
run_list                                            2544    2543      -1
lookupvar                                             62      61      -1
ipaddr_modify                                       1310    1309      -1
...
parse_stream                                        2254    2245      -9
evalpipe                                             356     347      -9
collect_if                                           210     197     -13
read_opt                                             869     851     -18
handle_dollar                                        681     658     -23
print_addrinfo                                      1342    1303     -39
iterate_on_dir                                       156      59     -97
print_route                                         1709    1609    -100
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767)       Total: -693 bytes
   text    data     bss     dec     hex filename
 841748     467    7872  850087   cf8a7 busybox_old
 841061     467    7872  849400   cf5f8 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05 12:06:05 +02:00
Denis Vlasenko
c7cc5a9432 mdev: Rob's #if forest removal
*: remove superfluous conts in "f(type *const param)"
2009-04-19 01:27:20 +00:00
Denis Vlasenko
f81e8dbc74 *: make "pragma GCC visibility push(hidden)" less ugly 2009-04-09 12:35:13 +00:00
Bernhard Reutner-Fischer
9de4622055 - make the first arg of the filter function passed to rtnl_dump_filter constant
to match normal iproute. No obj-code changes.
2008-06-12 15:54:49 +00:00
Denis Vlasenko
98636eb08c Use intra-DSO calls when we build libbusybox. No-op for normal build.
This was Bernhard Fischer' idea.

   text    data     bss     dec     hex filename
 773549    7781    9740  791070   c121e busybox.t7/0_lib/libbusybox.so.1.11.0.svn_unstripped
 769683    7397    9740  786820   c0184 busybox.t9t/0_lib/libbusybox.so.1.11.0.svn_unstripped
2008-05-09 17:59:34 +00:00
Denis Vlasenko
6ca409e0e4 trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
  of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts

size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
08a61180ce ll_map: disable interface name caching code
function                                             old     new   delta
find_by_index                                          -      26     +26
static.icache                                          4       -      -4
ll_idx_n2a                                            71      59     -12
static.ncache                                         16       -     -16
ll_index_to_flags                                     40      24     -16
xll_name_to_index                                    206     104    -102
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/3 up/down: 26/-150)          Total: -124 bytes

   text    data     bss     dec     hex filename
 734703    3040   14440  752183   b7a37 busybox_old
 734599    3040   14416  752055   b79b7 busybox_unstripped
2007-06-19 12:11:20 +00:00
Bernhard Reutner-Fischer
b290889f02 - add xsendto and use where appropriate; shrink iplink; sanitize libiproute a bit.
-916 byte
2007-04-12 11:34:39 +00:00
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
Glenn L McGrath
9a2d27249c IP applet by Bastian Blank <waldi@debian.org> 2002-11-10 01:33:55 +00:00