diff options
-rw-r--r-- | sys/modules/cyclic/Makefile | 19 | ||||
-rw-r--r-- | sys/modules/dtrace/Makefile | 23 | ||||
-rw-r--r-- | sys/modules/dtrace/Makefile.inc | 29 | ||||
-rw-r--r-- | sys/modules/dtrace/dtmalloc/Makefile | 13 | ||||
-rw-r--r-- | sys/modules/dtrace/dtrace/Makefile | 44 | ||||
-rw-r--r-- | sys/modules/dtrace/dtrace_test/Makefile | 14 | ||||
-rw-r--r-- | sys/modules/dtrace/dtraceall/Makefile | 8 | ||||
-rw-r--r-- | sys/modules/dtrace/dtraceall/dtraceall.c | 74 | ||||
-rw-r--r-- | sys/modules/dtrace/fasttrap/Makefile | 19 | ||||
-rw-r--r-- | sys/modules/dtrace/fbt/Makefile | 13 | ||||
-rw-r--r-- | sys/modules/dtrace/lockstat/Makefile | 14 | ||||
-rw-r--r-- | sys/modules/dtrace/profile/Makefile | 13 | ||||
-rw-r--r-- | sys/modules/dtrace/prototype/Makefile | 13 | ||||
-rw-r--r-- | sys/modules/dtrace/sdt/Makefile | 13 | ||||
-rw-r--r-- | sys/modules/dtrace/systrace/Makefile | 13 | ||||
-rw-r--r-- | sys/modules/opensolaris/Makefile | 23 |
16 files changed, 345 insertions, 0 deletions
diff --git a/sys/modules/cyclic/Makefile b/sys/modules/cyclic/Makefile new file mode 100644 index 0000000..93b4b93 --- /dev/null +++ b/sys/modules/cyclic/Makefile @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../cddl/cyclic + +KMOD= cyclic +SRCS= cyclic.c + +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../.. \ + -I${.CURDIR}/../../cddl/cyclic/${MACHINE_ARCH} + +CFLAGS+= -DDEBUG=1 + +IGNORE_PRAGMA= 1 + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/Makefile b/sys/modules/dtrace/Makefile new file mode 100644 index 0000000..dace9a5 --- /dev/null +++ b/sys/modules/dtrace/Makefile @@ -0,0 +1,23 @@ +# $FreeBSD$ + +.include <bsd.own.mk> +.include "Makefile.inc" + +SUBDIR= dtmalloc \ + dtrace \ + dtrace_test \ + dtraceall \ + lockstat \ + profile \ + prototype \ + sdt \ + systrace + +.if ${MACHINE_ARCH} == "amd64" +SUBDIR+= fasttrap \ + fbt +.elif ${MACHINE_ARCH} == "i386" +SUBDIR+= fbt +.endif + +.include <bsd.subdir.mk> diff --git a/sys/modules/dtrace/Makefile.inc b/sys/modules/dtrace/Makefile.inc new file mode 100644 index 0000000..c35764b --- /dev/null +++ b/sys/modules/dtrace/Makefile.inc @@ -0,0 +1,29 @@ +# $FreeBSD$ + +IGNORE_PRAGMA= 1 + +load : + -kldload cyclic + -kldload dtrace +.if ${MACHINE_ARCH} == "i386" + -kldload sdt + -kldload lockstat + -kldload fbt + -kldload prototype +.endif + -kldload profile + -kldload systrace + kldstat + +unload : + -kldunload systrace + -kldunload profile +.if ${MACHINE_ARCH} == "i386" + -kldunload prototype + -kldunload fbt + -kldunload lockstat + -kldunload sdt +.endif + -kldunload dtrace + -kldunload cyclic + kldstat diff --git a/sys/modules/dtrace/dtmalloc/Makefile b/sys/modules/dtrace/dtmalloc/Makefile new file mode 100644 index 0000000..efb2607 --- /dev/null +++ b/sys/modules/dtrace/dtmalloc/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev/dtmalloc + +KMOD= dtmalloc +SRCS= dtmalloc.c +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile new file mode 100644 index 0000000..5d16800 --- /dev/null +++ b/sys/modules/dtrace/dtrace/Makefile @@ -0,0 +1,44 @@ +# $FreeBSD$ + +ARCHDIR= ${MACHINE_ARCH} + +.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace +.PATH: ${.CURDIR}/../../../cddl/kern +.PATH: ${.CURDIR}/../../../cddl/dev/dtrace +.PATH: ${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR} + +KMOD= dtrace +SRCS= dtrace.c \ + dtrace_asm.S \ + dtrace_subr.c + +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +SRCS+= dis_tables.c \ + instr_size.c +.endif + +SRCS+= bus_if.h device_if.h vnode_if.h + +# Needed for dtrace_asm.S +SRCS+= assym.s + +# These are needed for assym.s +SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h + +.if ${MACHINE_ARCH} == "i386" +SRCS+= opt_apic.h +.endif + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/dev/dtrace \ + -I${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR} \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. -DDIS_MEM + +CFLAGS+= -DSMP -DDEBUG + +EXPORT_SYMS= dtrace_register \ + dtrace_unregister \ + dtrace_probe_lookup + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/dtrace_test/Makefile b/sys/modules/dtrace/dtrace_test/Makefile new file mode 100644 index 0000000..bc096f3 --- /dev/null +++ b/sys/modules/dtrace/dtrace_test/Makefile @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev/dtrace + +KMOD= dtrace_test +SRCS= dtrace_test.c + +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../.. + +CFLAGS+= -D_KERNEL + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/dtraceall/Makefile b/sys/modules/dtrace/dtraceall/Makefile new file mode 100644 index 0000000..6f09802 --- /dev/null +++ b/sys/modules/dtrace/dtraceall/Makefile @@ -0,0 +1,8 @@ +# $FreeBSD$ + +KMOD= dtraceall +SRCS= dtraceall.c + +CFLAGS+= -I${.CURDIR}/../../.. + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/dtraceall/dtraceall.c b/sys/modules/dtrace/dtraceall/dtraceall.c new file mode 100644 index 0000000..9a825eb --- /dev/null +++ b/sys/modules/dtrace/dtraceall/dtraceall.c @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2008 John Birrell <jb@freebsd.org> + * + * 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 AUTHOR 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 AUTHOR 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$ + */ + +#include <sys/cdefs.h> +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/conf.h> +#include <sys/kernel.h> +#include <sys/module.h> +#include <sys/errno.h> + +static int +dtraceall_modevent(module_t mod __unused, int type, void *data __unused) +{ + int error = 0; + + switch (type) { + case MOD_LOAD: + break; + + case MOD_UNLOAD: + break; + + case MOD_SHUTDOWN: + break; + + default: + error = EOPNOTSUPP; + break; + + } + + return (error); +} + +DEV_MODULE(dtraceall, dtraceall_modevent, NULL); +MODULE_VERSION(dtraceall, 1); + +/* All the DTrace modules should be dependencies here: */ +MODULE_DEPEND(dtraceall, cyclic, 1, 1, 1); +MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); +MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); +MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); +#if defined(__amd64__) || defined(__i386__) +MODULE_DEPEND(dtraceall, fbt, 1, 1, 1); +#endif +MODULE_DEPEND(dtraceall, lockstat, 1, 1, 1); +MODULE_DEPEND(dtraceall, sdt, 1, 1, 1); +MODULE_DEPEND(dtraceall, systrace, 1, 1, 1); +MODULE_DEPEND(dtraceall, profile, 1, 1, 1); diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile new file mode 100644 index 0000000..104fd9a --- /dev/null +++ b/sys/modules/dtrace/fasttrap/Makefile @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev/fasttrap + +KMOD= fasttrap +SRCS= fasttrap.c +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel +.endif + +CFLAGS+= -DSMP -DDEBUG + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/fbt/Makefile b/sys/modules/dtrace/fbt/Makefile new file mode 100644 index 0000000..9b69b22 --- /dev/null +++ b/sys/modules/dtrace/fbt/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev/fbt + +KMOD= fbt +SRCS= fbt.c +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/lockstat/Makefile b/sys/modules/dtrace/lockstat/Makefile new file mode 100644 index 0000000..d387dab --- /dev/null +++ b/sys/modules/dtrace/lockstat/Makefile @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev/lockstat + +KMOD= lockstat +SRCS= lockstat.c + +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/profile/Makefile b/sys/modules/dtrace/profile/Makefile new file mode 100644 index 0000000..22cd10d --- /dev/null +++ b/sys/modules/dtrace/profile/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev/profile + +KMOD= profile +SRCS= profile.c +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/prototype/Makefile b/sys/modules/dtrace/prototype/Makefile new file mode 100644 index 0000000..49cc0a8 --- /dev/null +++ b/sys/modules/dtrace/prototype/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev + +KMOD= prototype +SRCS= prototype.c +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/sdt/Makefile b/sys/modules/dtrace/sdt/Makefile new file mode 100644 index 0000000..d531d78 --- /dev/null +++ b/sys/modules/dtrace/sdt/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev/sdt + +KMOD= sdt +SRCS= sdt.c +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.include <bsd.kmod.mk> diff --git a/sys/modules/dtrace/systrace/Makefile b/sys/modules/dtrace/systrace/Makefile new file mode 100644 index 0000000..d85a365 --- /dev/null +++ b/sys/modules/dtrace/systrace/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../cddl/dev/systrace + +KMOD= systrace +SRCS= systrace.c +SRCS+= vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../../.. + +.include <bsd.kmod.mk> diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile new file mode 100644 index 0000000..5e2195a --- /dev/null +++ b/sys/modules/opensolaris/Makefile @@ -0,0 +1,23 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../cddl/compat/opensolaris/kern + +KMOD= opensolaris +SRCS= opensolaris.c \ + opensolaris_cmn_err.c \ + opensolaris_kmem.c + +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" +.PATH: ${.CURDIR}/../../cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} +SRCS+= atomic.S +.else +SRCS+= opensolaris_atomic.c +.endif + +CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris \ + -I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common \ + -I${.CURDIR}/../.. + +IGNORE_PRAGMA= 1 + +.include <bsd.kmod.mk> |