From 7e518a6648cd25343982e9ae18cf638ca8712d49 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 7 Aug 2015 19:56:22 +0000 Subject: [PATCH] - Use an explicit "depends_on module kernel" guard in DTrace libraries that reference types defined in the kernel. Otherwise dtrace(1) expects to find CTF definitions for all referenced types, which is not very reasonable when it is being used in a build environment. This was previously worked around by adding "-x nolibs" to dtrace -h or -G invocations, but as of r283025, dtrace(1) actually handles dependencies properly, so this is no longer necessary. - Remove "pragma ident" directives from DTrace libraries, as they're being phased out upstream as well. Submitted by: Krister Johansen [1] MFC after: 1 week Sponsored by: EMC / Isilon Storage Division --- cddl/lib/libdtrace/io.d | 3 +-- cddl/lib/libdtrace/ip.d | 1 + cddl/lib/libdtrace/nfs.d | 1 + cddl/lib/libdtrace/nfssrv.d | 3 ++- cddl/lib/libdtrace/psinfo.d | 2 ++ cddl/lib/libdtrace/regs_x86.d | 2 -- cddl/lib/libdtrace/sched.d | 4 +--- cddl/lib/libdtrace/siftr.d | 1 + cddl/lib/libdtrace/tcp.d | 1 + cddl/lib/libdtrace/udp.d | 1 + 10 files changed, 11 insertions(+), 8 deletions(-) diff --git a/cddl/lib/libdtrace/io.d b/cddl/lib/libdtrace/io.d index 18a54afdb937..41f7aa1533b8 100644 --- a/cddl/lib/libdtrace/io.d +++ b/cddl/lib/libdtrace/io.d @@ -25,8 +25,7 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - +#pragma D depends_on module kernel #pragma D depends_on provider io typedef struct devinfo { diff --git a/cddl/lib/libdtrace/ip.d b/cddl/lib/libdtrace/ip.d index a1a2996362fd..33fb007e6fff 100644 --- a/cddl/lib/libdtrace/ip.d +++ b/cddl/lib/libdtrace/ip.d @@ -25,6 +25,7 @@ * Copyright (c) 2013 Mark Johnston */ +#pragma D depends_on module kernel #pragma D depends_on provider ip /* diff --git a/cddl/lib/libdtrace/nfs.d b/cddl/lib/libdtrace/nfs.d index be342286f1b5..ae864ed363d2 100644 --- a/cddl/lib/libdtrace/nfs.d +++ b/cddl/lib/libdtrace/nfs.d @@ -30,6 +30,7 @@ #pragma D depends_on library ip.d #pragma D depends_on library net.d +#pragma D depends_on module kernel #pragma D depends_on module nfs typedef struct nfsv4opinfo { diff --git a/cddl/lib/libdtrace/nfssrv.d b/cddl/lib/libdtrace/nfssrv.d index 68ac08b58cde..37842f7963a1 100644 --- a/cddl/lib/libdtrace/nfssrv.d +++ b/cddl/lib/libdtrace/nfssrv.d @@ -30,7 +30,8 @@ #pragma D depends_on library ip.d #pragma D depends_on library net.d -#pragma D depends_on module nfs.d +#pragma D depends_on library nfs.d +#pragma D depends_on module kernel #pragma D depends_on module nfssrv #pragma D binding "1.5" translator diff --git a/cddl/lib/libdtrace/psinfo.d b/cddl/lib/libdtrace/psinfo.d index c2219f70a35d..1b13863df0e3 100644 --- a/cddl/lib/libdtrace/psinfo.d +++ b/cddl/lib/libdtrace/psinfo.d @@ -28,6 +28,8 @@ * Use is subject to license terms. */ +#pragma D depends_on module kernel + typedef struct psinfo { int pr_nlwp; /* number of threads */ pid_t pr_pid; /* unique process id */ diff --git a/cddl/lib/libdtrace/regs_x86.d b/cddl/lib/libdtrace/regs_x86.d index 7dce19717642..03528a6423d3 100644 --- a/cddl/lib/libdtrace/regs_x86.d +++ b/cddl/lib/libdtrace/regs_x86.d @@ -28,8 +28,6 @@ * Use is subject to license terms. */ -#pragma ident "@(#)regs.d.in 1.1 04/09/28 SMI" - inline int R_GS = 0; #pragma D binding "1.0" R_GS inline int R_FS = 1; diff --git a/cddl/lib/libdtrace/sched.d b/cddl/lib/libdtrace/sched.d index d91d3c5318f0..104fd571e4c0 100644 --- a/cddl/lib/libdtrace/sched.d +++ b/cddl/lib/libdtrace/sched.d @@ -27,9 +27,7 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - -#pragma D depends_on module unix +#pragma D depends_on module kernel #pragma D depends_on provider sched struct cpuinfo { diff --git a/cddl/lib/libdtrace/siftr.d b/cddl/lib/libdtrace/siftr.d index a6ff844901dc..37bc30ff3e06 100644 --- a/cddl/lib/libdtrace/siftr.d +++ b/cddl/lib/libdtrace/siftr.d @@ -21,6 +21,7 @@ * $FreeBSD$ */ +#pragma D depends_on module kernel #pragma D depends_on module siftr #pragma D depends_on provider tcp diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d index 4b826f175572..8398cd3ec6ad 100644 --- a/cddl/lib/libdtrace/tcp.d +++ b/cddl/lib/libdtrace/tcp.d @@ -26,6 +26,7 @@ */ #pragma D depends_on library ip.d +#pragma D depends_on module kernel #pragma D depends_on provider tcp /* diff --git a/cddl/lib/libdtrace/udp.d b/cddl/lib/libdtrace/udp.d index 21538eb0ef3c..eeba58c8752f 100644 --- a/cddl/lib/libdtrace/udp.d +++ b/cddl/lib/libdtrace/udp.d @@ -26,6 +26,7 @@ */ #pragma D depends_on library ip.d +#pragma D depends_on module kernel #pragma D depends_on provider udp /*