aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-10-10 13:50:53 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-10-10 13:50:53 +0200
commit53b2fdcdba4ced600da963147be425a21d0f6e53 (patch)
tree6ff4eb40af61e978fc35fc320a10e0c012993bba
parent5156b245536ce0f07165793f07c63fd9fa5dd3b7 (diff)
downloadbusybox-w32-53b2fdcdba4ced600da963147be425a21d0f6e53.tar.gz
busybox-w32-53b2fdcdba4ced600da963147be425a21d0f6e53.tar.bz2
busybox-w32-53b2fdcdba4ced600da963147be425a21d0f6e53.zip
*: add NOINLINEs where code noticeably shrinks
function old new delta display 85 1463 +1378 -73 bytes select_and_cluster - 1088 +1088 -139 bytes parse_reply - 979 +979 -109 bytes zbc_num_sqrt - 632 +632 -191 bytes show_bridge_port - 585 +585 -56 bytes sp_256_proj_point_add_8 - 576 +576 -45 bytes encode_then_append_var_plusminus - 554 +554 -118 bytes read_mode_db - 537 +537 -47 bytes fbset_main 1331 747 -584 sp_256_ecc_mulmod_8 1157 536 -621 brctl_main 2189 1548 -641 expand_one_var 2544 1872 -672 zxc_vm_process 6412 5589 -823 send_queries 1813 725 -1088 recv_and_process_peer_pkt 2245 1018 -1227 bb_dump_dump 1531 80 -1451 ------------------------------------------------------------------------------ (add/remove: 7/0 grow/shrink: 1/8 up/down: 6329/-7107) Total: -778 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/dump.c2
-rw-r--r--miscutils/bc.c2
-rw-r--r--networking/brctl.c2
-rw-r--r--networking/nslookup.c2
-rw-r--r--networking/ntpd.c2
-rw-r--r--networking/tls_sp_c32.c2
-rw-r--r--shell/hush.c2
-rw-r--r--util-linux/fbset.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/libbb/dump.c b/libbb/dump.c
index f8bb6fd03..fcdee8343 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -532,7 +532,7 @@ static void conv_u(PR *pr, unsigned char *p)
532 } 532 }
533} 533}
534 534
535static void display(priv_dumper_t* dumper) 535static NOINLINE void display(priv_dumper_t* dumper)
536{ 536{
537 unsigned char *bp; 537 unsigned char *bp;
538 unsigned char savech = '\0'; 538 unsigned char savech = '\0';
diff --git a/miscutils/bc.c b/miscutils/bc.c
index f9b08b01e..ae370ff55 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -2261,7 +2261,7 @@ static FAST_FUNC BC_STATUS zbc_num_p(BcNum *a, BcNum *b, BcNum *restrict c, size
2261} 2261}
2262#define zbc_num_p(...) (zbc_num_p(__VA_ARGS__) COMMA_SUCCESS) 2262#define zbc_num_p(...) (zbc_num_p(__VA_ARGS__) COMMA_SUCCESS)
2263 2263
2264static BC_STATUS zbc_num_sqrt(BcNum *a, BcNum *restrict b, size_t scale) 2264static NOINLINE BC_STATUS zbc_num_sqrt(BcNum *a, BcNum *restrict b, size_t scale)
2265{ 2265{
2266 BcStatus s; 2266 BcStatus s;
2267 BcNum num1, num2, half, f, fprime, *x0, *x1, *temp; 2267 BcNum num1, num2, half, f, fprime, *x0, *x1, *temp;
diff --git a/networking/brctl.c b/networking/brctl.c
index c83aac6e0..956bd91f3 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -318,7 +318,7 @@ static void printf_xstrtou(const char *fmt)
318 printf(fmt, xstrtou(filedata, 0)); 318 printf(fmt, xstrtou(filedata, 0));
319} 319}
320 320
321static void show_bridge_port(const char *name) 321static NOINLINE void show_bridge_port(const char *name)
322{ 322{
323 char pathbuf[IFNAMSIZ + sizeof("/brport/forward_delay_timer") + 8]; 323 char pathbuf[IFNAMSIZ + sizeof("/brport/forward_delay_timer") + 8];
324 char *sfx; 324 char *sfx;
diff --git a/networking/nslookup.c b/networking/nslookup.c
index de7b5c0e7..6da97baf4 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -335,7 +335,7 @@ enum {
335 OPT_debug = (1 << 0), 335 OPT_debug = (1 << 0),
336}; 336};
337 337
338static int parse_reply(const unsigned char *msg, size_t len) 338static NOINLINE int parse_reply(const unsigned char *msg, size_t len)
339{ 339{
340 HEADER *header; 340 HEADER *header;
341 341
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 5bd4d2d3e..204e1d7c2 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -1152,7 +1152,7 @@ fit(peer_t *p, double rd)
1152// return 0; 1152// return 0;
1153 return 1; 1153 return 1;
1154} 1154}
1155static peer_t* 1155static NOINLINE peer_t*
1156select_and_cluster(void) 1156select_and_cluster(void)
1157{ 1157{
1158 peer_t *p; 1158 peer_t *p;
diff --git a/networking/tls_sp_c32.c b/networking/tls_sp_c32.c
index 4c0cd320b..4d4ecdd74 100644
--- a/networking/tls_sp_c32.c
+++ b/networking/tls_sp_c32.c
@@ -1162,7 +1162,7 @@ static void sp_256_proj_point_dbl_8(sp_point* r, sp_point* p)
1162 * p Frist point to add. 1162 * p Frist point to add.
1163 * q Second point to add. 1163 * q Second point to add.
1164 */ 1164 */
1165static void sp_256_proj_point_add_8(sp_point* r, sp_point* p, sp_point* q) 1165static NOINLINE void sp_256_proj_point_add_8(sp_point* r, sp_point* p, sp_point* q)
1166{ 1166{
1167 sp_digit t1[2*8]; 1167 sp_digit t1[2*8];
1168 sp_digit t2[2*8]; 1168 sp_digit t2[2*8];
diff --git a/shell/hush.c b/shell/hush.c
index 87fc2f445..7156297cf 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -6311,7 +6311,7 @@ static char *encode_then_expand_vararg(const char *str, int handle_squotes, int
6311 6311
6312/* Expanding ARG in ${var+ARG}, ${var-ARG} 6312/* Expanding ARG in ${var+ARG}, ${var-ARG}
6313 */ 6313 */
6314static int encode_then_append_var_plusminus(o_string *output, int n, 6314static NOINLINE int encode_then_append_var_plusminus(o_string *output, int n,
6315 char *str, int dquoted) 6315 char *str, int dquoted)
6316{ 6316{
6317 struct in_str input; 6317 struct in_str input;
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index cc5413b40..41cc29f37 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -267,7 +267,7 @@ static void ss(uint32_t *x, uint32_t flag, char *buf, const char *what)
267 * vsync high 267 * vsync high
268 * endmode 268 * endmode
269 */ 269 */
270static int read_mode_db(struct fb_var_screeninfo *base, const char *fn, 270static NOINLINE int read_mode_db(struct fb_var_screeninfo *base, const char *fn,
271 const char *mode) 271 const char *mode)
272{ 272{
273 char *token[2], *p, *s; 273 char *token[2], *p, *s;