aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-10-05 17:54:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-10-05 17:54:54 +0000
commitc710e87b3b963b106c5efc0e2d1c41ab2a7b9c6a (patch)
treef4986e4d535fd326082b65b0c83b6fc50c7dba0c /share
parentbb52ed324958e4f3e202b6aa5162e8ca56283930 (diff)
parent89ef7a960ae93177b0923943aa2c4f86c45bc497 (diff)
downloadsrc-c710e87b3b963b106c5efc0e2d1c41ab2a7b9c6a.tar.gz
src-c710e87b3b963b106c5efc0e2d1c41ab2a7b9c6a.zip
Merge ^/head r288457 through r288830.
Notes
Notes: svn path=/projects/clang370-import/; revision=288831
Diffstat (limited to 'share')
-rw-r--r--share/dtrace/Makefile3
-rwxr-xr-xshare/dtrace/blocking57
-rw-r--r--share/man/man7/hier.75
-rw-r--r--share/mk/bsd.sys.mk2
-rw-r--r--share/mk/meta.stage.mk7
5 files changed, 65 insertions, 9 deletions
diff --git a/share/dtrace/Makefile b/share/dtrace/Makefile
index 11fd1afb3faf..c0c3f5ec0be8 100644
--- a/share/dtrace/Makefile
+++ b/share/dtrace/Makefile
@@ -12,7 +12,8 @@ SUBDIR= ${_toolkit}
_toolkit= toolkit
.endif
-SCRIPTS= disklatency \
+SCRIPTS= blocking \
+ disklatency \
disklatencycmd \
hotopen \
nfsattrstats \
diff --git a/share/dtrace/blocking b/share/dtrace/blocking
new file mode 100755
index 000000000000..006500877087
--- /dev/null
+++ b/share/dtrace/blocking
@@ -0,0 +1,57 @@
+#!/usr/sbin/dtrace -s
+/*-
+ * Copyright (c) 2015 Pawel Jakub Dawidek <pawel@dawidek.net>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ *
+ * This little script is for use with programs that use event loop and should
+ * sleep only when waiting for events (eg. via kevent(2)). When a program is
+ * going to sleep in the kernel, the script will show its name, PID, kernel
+ * stack trace and userland stack trace. Sleeping in kevent(2) is ignored.
+ *
+ * usage: blocking <execname>
+ */
+
+#pragma D option quiet
+
+syscall::kevent:entry
+/execname == $$1/
+{
+ self->inkevent = 1;
+}
+
+fbt::sleepq_add:entry
+/!self->inkevent && execname == $$1/
+{
+ printf("\n%s(%d) is blocking...\n", execname, pid);
+ stack();
+ ustack();
+}
+
+syscall::kevent:return
+/execname == $$1/
+{
+ self->inkevent = 0;
+}
diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7
index 6d4534ba98fa..9def56246a48 100644
--- a/share/man/man7/hier.7
+++ b/share/man/man7/hier.7
@@ -28,7 +28,7 @@
.\" @(#)hier.7 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd January 14, 2015
+.Dd October 2, 2015
.Dt HIER 7
.Os
.Sh NAME
@@ -685,9 +685,6 @@ source code for contributed cryptography software
.It Pa etc/
source code for files in
.Pa /etc
-.It Pa games/
-source code for files in
-.Pa /usr/games
.It Pa gnu/
Utilities covered by the GNU General Public License
.It Pa include/
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 1d14c1c44051..74e28346deed 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -149,7 +149,7 @@ CXXFLAGS.clang+= -Wno-c++11-extensions
.if ${MK_SSP} != "no" && \
${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
# Don't use -Wstack-protector as it breaks world with -Werror.
-SSP_CFLAGS?= -fstack-protector
+SSP_CFLAGS?= -fstack-protector-strong
CFLAGS+= ${SSP_CFLAGS}
.endif # SSP && !ARM && !MIPS
diff --git a/share/mk/meta.stage.mk b/share/mk/meta.stage.mk
index 467e33954a34..7f6c3b3691c2 100644
--- a/share/mk/meta.stage.mk
+++ b/share/mk/meta.stage.mk
@@ -237,10 +237,11 @@ stage_as.$s: .dirdep
CLEANFILES += ${STAGE_TARGETS} stage_incs stage_includes
# stage_*links usually needs to follow any others.
-.for t in ${STAGE_TARGETS:N*links:O:u}
-.ORDER: $t stage_links
-.ORDER: $t stage_symlinks
+.if !empty(STAGE_SETS) && !empty(STAGE_TARGETS:Nstage_links)
+.for s in ${STAGE_SETS:O:u}
+stage_links.$s: ${STAGE_TARGETS:Nstage_links:O:u}
.endfor
+.endif
# make sure this exists
staging: