summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartekgola@gmail.com>2013-10-16 19:18:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2013-10-16 19:18:05 +0200
commit28a209466f43c22db42dd02baa136ac7ac25069b (patch)
treebd8fc6cdbe9bfc9e2a586ff01b9fadcaecd60560 /docs
parent64938011f3ba06a8f425926397172dc361bce851 (diff)
bloat-o-meter: add usage info
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/keep_data_small.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/docs/keep_data_small.txt b/docs/keep_data_small.txt
index 21d732674..9fc799646 100644
--- a/docs/keep_data_small.txt
+++ b/docs/keep_data_small.txt
@@ -138,13 +138,6 @@ less readable, use #defines:
#define sector (G.sector)
- Word of caution
-
-If applet doesn't use much of global data, converting it to use
-one of above methods is not worth the resulting code obfuscation.
-If you have less than ~300 bytes of global data - don't bother.
-
-
Finding non-shared duplicated strings
strings busybox | sort | uniq -c | sort -nr
@@ -224,6 +217,14 @@ Result (non-static busybox built against glibc):
Keeping code small
+Use scripts/bloat-o-meter to check whether introduced changes
+didn't generate unnecessary bloat. This script needs unstripped binaries
+to generate a detailed report. To automate this, just use
+"make bloatcheck". It requires busybox_old binary to be present,
+use "make baseline" to generate it from unmodified source, or
+copy busybox_unstripped to busybox_old before modifying sources
+and rebuilding.
+
Set CONFIG_EXTRA_CFLAGS="-fno-inline-functions-called-once",
produce "make bloatcheck", see the biggest auto-inlined functions.
Now, set CONFIG_EXTRA_CFLAGS back to "", but add NOINLINE