svn commit: trunk/busybox: coreutils include libbb sysklogd
Denis Vlasenko
vda.linux at googlemail.com
Thu Jan 4 13:52:49 PST 2007
On Thursday 04 January 2007 19:15, Bernhard Fischer wrote:
> On Thu, Jan 04, 2007 at 10:00:00AM -0800, vda at busybox.net wrote:
> >Author: vda
> >Date: 2007-01-04 09:59:59 -0800 (Thu, 04 Jan 2007)
> >New Revision: 17156
> >
> >Log:
> >new libbb func: xmalloc_realpath (+ use it where makes sense)
> >syslogd, logread: add debugging code (disabled)
> >syslogs: drastically smaller bss; fix "-C n" behaviour
>
> Just curious as to the stats for this change?
dev_log_name was taking disproportionate chunk of bss
(compared to its modest goal of holding a filename):
function old new delta
syslogd_main 1145 1169 +24
xmalloc_realpath - 14 +14
packed_usage 21908 21918 +10
interrupted 21 27 +6
xstrtoull_range_sfx 304 309 +5
expand 2404 2406 +2
quit_signal 115 116 +1
gunzip_main 743 744 +1
telnet_main 1561 1557 -4
error_exit 35 30 -5
popstring 138 132 -6
input_tab 2945 2937 -8
.rodata 157384 157352 -32
logread_main 556 494 -62
jmp_env 156 - -156
dev_log_name 4096 4 -4092
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 7/7 up/down: 63/-4365) Total: -4302 bytes
As usual gcc 4.1.1 has some pretty bizarre jitter whenever you
touch *.h files... (gunzip_main +1 etc)
# size busybox_old busybox_unstripped
text data bss dec hex filename
741183 5240 79464 825887 c9a1f busybox_old
741119 5240 75208 821567 c893f busybox_unstripped
> >--- trunk/busybox/include/usage.h 2007-01-04 17:57:54 UTC (rev 17155)
> >+++ trunk/busybox/include/usage.h 2007-01-04 17:59:59 UTC (rev 17156)
> >@@ -3021,7 +3021,8 @@
> > "\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)" \
> > "\n -L Log locally and via network logging (default is network only)") \
> > USE_FEATURE_IPC_SYSLOG( \
> >- "\n -C [size(KiB)] Log to a circular buffer (read the buffer using logread)")
> ->+ "\n -C[size(KiB)] Log to a circular buffer (read the buffer using logread)")
> +>+ "\n -C[size(KiB)] Log to a circular buffer (read via logread)")
>
> is smaller and should be sufficiently clear.
Yes. Usage text in general will benefit from a few people
making janitorial passes. I did a few.
> >+char *xmalloc_realpath(const char *path)
> >+{
>
> Didn't try, but would using attribute_malloc (that we had in platform.h
> but someone apparently removed it since it wasn't used yet..) be
> benefical?
How does it help? Helps gcc optimizer to have better alias info?
--
vda
More information about the busybox
mailing list