<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/libbb/copyfd.c, branch zstd</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=zstd</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=zstd'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2020-12-14T17:25:28+00:00</updated>
<entry>
<title>libbb: create and use mmap() helpers</title>
<updated>2020-12-14T17:25:28+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-12-14T17:25:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=fd3c512f88d43e6633bd3c3110cfa0bb321adaa8'/>
<id>urn:sha1:fd3c512f88d43e6633bd3c3110cfa0bb321adaa8</id>
<content type='text'>
function                                             old     new   delta
mmap_anon                                              -      22     +22
mmap_read                                              -      21     +21
xmmap_anon                                             -      16     +16
rpm_gettags                                          465     447     -18
bb_full_fd_action                                    498     480     -18
uevent_main                                          337     310     -27
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 0/3 up/down: 59/-63)             Total: -4 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>dpkg-deb: work around bogus error message when working with XZ compressed packages</title>
<updated>2019-10-11T12:11:44+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2019-10-11T12:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=42f454b13b8d972e85acd7f046065ec69af4d206'/>
<id>urn:sha1:42f454b13b8d972e85acd7f046065ec69af4d206</id>
<content type='text'>
function                                             old     new   delta
unpack_xz_stream                                    2309    2317      +8
bb_full_fd_action                                    464     472      +8

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb: reduce the overhead of single parameter bb_error_msg() calls</title>
<updated>2019-07-02T09:35:03+00:00</updated>
<author>
<name>James Byrne</name>
<email>james.byrne@origamienergy.com</email>
</author>
<published>2019-07-02T09:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=6937487be73cd4563b876413277a295a5fe2f32c'/>
<id>urn:sha1:6937487be73cd4563b876413277a295a5fe2f32c</id>
<content type='text'>
Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by
Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower
overhead call to bb_perror_msg() when only a string was being printed
with no parameters. This saves space for some CPU architectures because
it avoids the overhead of a call to a variadic function. However there
has never been a simple version of bb_error_msg(), and since 2007 many
new calls to bb_perror_msg() have been added that only take a single
parameter and so could have been using bb_simple_perror_message().

This changeset introduces 'simple' versions of bb_info_msg(),
bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and
bb_herror_msg_and_die(), and replaces all calls that only take a
single parameter, or use something like ("%s", arg), with calls to the
corresponding 'simple' version.

Since it is likely that single parameter calls to the variadic functions
may be accidentally reintroduced in the future a new debugging config
option WARN_SIMPLE_MSG has been introduced. This uses some macro magic
which will cause any such calls to generate a warning, but this is
turned off by default to avoid use of the unpleasant macros in normal
circumstances.

This is a large changeset due to the number of calls that have been
replaced. The only files that contain changes other than simple
substitution of function calls are libbb.h, libbb/herror_msg.c,
libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c,
networking/udhcp/common.h and util-linux/mdev.c additonal macros have
been added for logging so that single parameter and multiple parameter
logging variants exist.

The amount of space saved varies considerably by architecture, and was
found to be as follows (for 'defconfig' using GCC 7.4):

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

Note that for the MIPS architecture only an exception had to be made
disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h)
because it made these files larger on MIPS.

Signed-off-by: James Byrne &lt;james.byrne@origamienergy.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>whitespace and comment format fixes, no code changes</title>
<updated>2017-10-05T12:40:24+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-10-05T12:40:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=ebe6d9d8758d36e03cf39b6587597c67ab778436'/>
<id>urn:sha1:ebe6d9d8758d36e03cf39b6587597c67ab778436</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>copyfd: guard use of munmap() with #if (windows builds need this)</title>
<updated>2017-07-15T09:44:13+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-07-14T14:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e5b1f5af737078dfe4baba79dd0bc5a3b7616ad0'/>
<id>urn:sha1:e5b1f5af737078dfe4baba79dd0bc5a3b7616ad0</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb: use sendfile() to copy data between file descriptors</title>
<updated>2014-11-27T22:31:58+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartekgola@gmail.com</email>
</author>
<published>2014-11-27T12:20:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=8d75d794ea505003fddea8e757d43976db8d6861'/>
<id>urn:sha1:8d75d794ea505003fddea8e757d43976db8d6861</id>
<content type='text'>
Busybox already uses sendfile in httpd. This patch proposes to use it
globally to copy data between file descriptors.

It speeds up the copying on slow systems a lot - below are the times needed
to copy a 450Mb file with and without this option enabled on a BeagleBone
Black:

sendfile:
user    0m0.000s
sys     0m8.170s

read/write 4k:
user    0m0.470s
sys     0m16.300s

function                                             old     new   delta
bb_full_fd_action                                    394     474     +80

Signed-off-by: Bartosz Golaszewski &lt;bartekgola@gmail.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>*: make GNU licensing statement forms more regular</title>
<updated>2010-08-16T18:14:46+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2010-08-16T18:14:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0ef64bdb40c54681e8dd5ab8df42ac88e4ab1d4a'/>
<id>urn:sha1:0ef64bdb40c54681e8dd5ab8df42ac88e4ab1d4a</id>
<content type='text'>
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb/copyfd.c: fix the case of copy buffer &lt;= 4kb</title>
<updated>2010-06-26T21:08:59+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2010-06-26T21:08:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1eaf7e76bfff22646baf7d815650106e64ba0691'/>
<id>urn:sha1:1eaf7e76bfff22646baf7d815650106e64ba0691</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>tar: fix --to-command wrt short writes</title>
<updated>2010-06-26T16:11:44+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2010-06-26T16:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d0a8a0d31243f2ac798531ced2cca45ddf1fea42'/>
<id>urn:sha1:d0a8a0d31243f2ac798531ced2cca45ddf1fea42</id>
<content type='text'>
function                                             old     new   delta
bb_copyfd_exact_size                                  51      98     +47
bb_full_fd_action                                    362     394     +32
get_header_tar                                      1546    1558     +12
data_extract_to_command                              430     439      +9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 100/0)             Total: 100 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb/copyfd.c: don't mmap a largish buffer if we only want to copy a few kb</title>
<updated>2010-03-19T13:34:30+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2010-03-19T13:34:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bcda0042e2313d65a835b874c78bf215d743a844'/>
<id>urn:sha1:bcda0042e2313d65a835b874c78bf215d743a844</id>
<content type='text'>
function                                             old     new   delta
bb_full_fd_action                                    283     295     +12

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
