summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-10-05 00:11:49 +0000
committerngie <ngie@FreeBSD.org>2015-10-05 00:11:49 +0000
commite3bac3a30a41f56ac36f4791a7df260f2155c8db (patch)
treeac20948d4aa368300bc16ece67336a1bed25e992 /share
parentca6cf0ba737487849f2ee102afce74545600850c (diff)
parent85fa330dc74592563cea8d7cf0e628fd30683993 (diff)
downloadFreeBSD-src-e3bac3a30a41f56ac36f4791a7df260f2155c8db.zip
FreeBSD-src-e3bac3a30a41f56ac36f4791a7df260f2155c8db.tar.gz
MFhead @ r281414
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 11fd1af..c0c3f5e 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 0000000..0065008
--- /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 6d4534b..9def562 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 411e816..c68e0ab 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 467e339..7f6c3b3 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:
OpenPOWER on IntegriCloud