1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/bin
Jilles Tjoelker bd9b38d1f7 sh: Don't allocate a redirtab if there are no redirections.
Builtins (including variable assignments without command word), function
calls and redirected compound commands need to restore file descriptors
to their original state after execution. This is handled by allocating a
redirtab structure. These mallocs and frees show up heavily in pmcstat.

Only allocate a redirtab if there are actually redirections and maintain a
count of how many levels of REDIR_PUSH there are without redirtabs.

A simple loop without external programs like

sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do
    i=$((i+1)); done'

is over 25% faster on an amd64 bhyve VM.
2016-01-30 21:21:25 +00:00
..
cat Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
chflags Add META_MODE support. 2015-06-13 19:20:56 +00:00
chio Add META_MODE support. 2015-06-13 19:20:56 +00:00
chmod Add META_MODE support. 2015-06-13 19:20:56 +00:00
cp Add META_MODE support. 2015-06-13 19:20:56 +00:00
csh Fix a ton of speelling errors 2015-10-21 05:37:09 +00:00
date Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
dd Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as 2015-10-18 05:49:58 +00:00
df Add more text to explain --libxo flag. 2015-12-01 19:18:53 +00:00
domainname Add META_MODE support. 2015-06-13 19:20:56 +00:00
echo Add META_MODE support. 2015-06-13 19:20:56 +00:00
ed ed(1): Prevent possible string overflows 2015-12-18 23:05:36 +00:00
expr Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
freebsd-version Add missing CLEANFILES. 2015-12-07 16:08:13 +00:00
getfacl Add META_MODE support. 2015-06-13 19:20:56 +00:00
hostname Add META_MODE support. 2015-06-13 19:20:56 +00:00
kenv Add META_MODE support. 2015-06-13 19:20:56 +00:00
kill Add META_MODE support. 2015-06-13 19:20:56 +00:00
ln Add META_MODE support. 2015-06-13 19:20:56 +00:00
ls Fix ls -l alignement with new locales 2015-12-07 20:48:28 +00:00
mkdir Add META_MODE support. 2015-06-13 19:20:56 +00:00
mv Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
pax pax: prevent possible buffer overflow 2015-12-29 16:31:28 +00:00
pkill Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
ps Fix spelling, as recommended by igor tool. 2015-12-01 19:20:38 +00:00
pwait Add META_MODE support. 2015-06-13 19:20:56 +00:00
pwd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rcp Add META_MODE support. 2015-06-13 19:20:56 +00:00
realpath Add META_MODE support. 2015-06-13 19:20:56 +00:00
rm Protecting against rm -rf / is now POSIXLY_CORRECT per posix 1003.1 2015-11-07 02:18:19 +00:00
rmail META MODE: Don't create .meta files when symlinking sources into the obj directory. 2015-11-25 19:44:43 +00:00
rmdir Add META_MODE support. 2015-06-13 19:20:56 +00:00
setfacl Don't mention the "canonical six" in setfacl(1); it describes semantics 2016-01-23 12:19:37 +00:00
sh sh: Don't allocate a redirtab if there are no redirections. 2016-01-30 21:21:25 +00:00
sleep Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
stty Prevent potential integer overflow 2015-07-13 05:59:41 +00:00
sync Add META_MODE support. 2015-06-13 19:20:56 +00:00
test test: Optimize operator lookup. 2016-01-30 19:59:58 +00:00
tests Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
uuidgen Add META_MODE support. 2015-06-13 19:20:56 +00:00
Makefile Start using the fact that SUBDIR.yes is added to SUBDIR 2015-10-05 21:41:55 +00:00
Makefile.inc