[PATCH] libbb: reduce the overhead of single parameter bb_error_msg() calls

James Byrne james.byrne at origamienergy.com
Thu Jun 27 09:52:18 UTC 2019


Hi,

I sent a first version of this patch in May 2018, but the comment from 
Denys in his reply on May 11, 2018 was that he didn't like the magic 
macros I had used to automatically substitute different versions of 
single parameter bb_xx_msg() calls, and would prefer explicit use of the 
simple functions.

I didn't have time to take another look at this until fairly recently, 
but I've now done a version that explicitly replaces all single 
parameter versions of bb_xx_msg() calls. As a result this is a very 
large patch, so I am sending it as an attachment, and I've had to gzip 
it since my first attempt to send this resulted in a message from the 
list system saying it was being held for moderation because the message 
body was too big!

Since this is a large change, and the benefit is fairly small, I'm not 
entirely sure whether this change is worthwhile, but since I've done 
then work I thought it was worth submitting it. The size saving is very 
architecture dependent, and only gets you a significant saving on PPC 
and x86_64. I found it to be as follows (for 'defconfig' using GCC 7.4):

      Arm:     -92 bytes
      MIPS:    -52 bytes
      PPC:   -1836 bytes
      x86_64: -938 bytes

Regards,

James Byrne

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libbb-reduce-the-overhead-of-single-parameter-bb_err.patch.gz
Type: application/gzip
Size: 71848 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190627/3bc3a718/attachment-0001.bin>


More information about the busybox mailing list