Author: markj
Date: Tue Feb 13 22:43:07 2018
New Revision: 329249
URL: https://svnweb.freebsd.org/changeset/base/329249
Log:
MFC r327888, r327972, r327973:
Add "jid" and "jailname" variables to DTrace.
Added:
stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d
- copied unchanged from r327888,
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d
stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d
- copied unchanged from r327888,
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d
Modified:
stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
stable/11/cddl/usr.sbin/dtrace/tests/common/safety/Makefile
stable/11/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
stable/11/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
Directory Properties:
stable/11/ (props changed)
Copied:
stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d
(from r327888,
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d)
==
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++
stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d
Tue Feb 13 22:43:07 2018(r329249, copy of r327888,
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d)
@@ -0,0 +1,44 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2018 Domagoj Stolfa .
+ *
+ * This software was developed by BAE Systems, the University of Cambridge
+ * Computer Laboratory, and Memorial University under DARPA/AFRL contract
+ * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing
+ * (TC) research program.
+ *
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*
+ * ASSERTION:
+ * collect jailname at every fbt probe and at every firing of a
+ * high-frequency profile probe
+ */
+
+fbt:::
+{
+ @a[jailname] = count();
+}
+
+profile-4999hz
+{
+ @a[jailname] = count();
+}
+
+tick-1sec
+/n++ == 10/
+{
+ exit(0);
+}
Copied:
stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d
(from r327888,
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d)
==
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++
stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d
Tue Feb 13 22:43:07 2018(r329249, copy of r327888,
head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d)
@@ -0,0 +1,44 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2018 Domagoj Stolfa .
+ *
+ * This software was developed by BAE Systems, the University of Cambridge
+ * Computer Laboratory, and Memorial University under DARPA/AFRL contract
+ * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing
+ * (TC) research program.
+ *
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*
+ * ASSERTION:
+ * collect jid at every fbt probe and at every firing of a
+ * high-frequency profile probe
+ */
+
+fbt:::
+{
+ @a[jid] = count();
+}
+
+profile-4999hz
+{
+ @a[jid] = count();
+}
+
+tick-1sec
+/n++ == 10/
+{
+ exit(0);
+}
Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
==
--- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Tue Feb
13 22:42:25 2018(r329248)
+++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Tue Feb
13 22:43:07 2018(r329249)
@@ -311,6 +311,12 @@ static const dt_ident_t _dtrace_globals[] = {
DT_VERS_1_5, _idops_func, "string(int, void *)" },
{ "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0,
_idops_type, "uint_t" },
+#ifdef __FreeBSD__
+{ "jailname", DT_IDENT_SCALAR, 0,