FreeBSD Bugzilla – Attachment 111541 Details for
Bug 152822
[patch] DTrace: syscall provider for compat/freebsd32
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 4.31 KB, created by
Artem Belevich
on 2010-12-04 05:20:10 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Artem Belevich
Created:
2010-12-04 05:20:10 UTC
Size:
4.31 KB
patch
obsolete
>commit bc5cab1e413c97c1001c4dc545cfe544dac53fba >Author: Artem Belevich >Date: Fri Dec 3 13:31:45 2010 -0800 > > Dtrace syscall provider for freebsd32 layer > >diff --git a/sys/cddl/dev/systrace/systrace.c b/sys/cddl/dev/systrace/systrace.c >index 72c25e4..23ec11a 100644 >--- a/sys/cddl/dev/systrace/systrace.c >+++ b/sys/cddl/dev/systrace/systrace.c >@@ -70,6 +70,21 @@ extern struct sysent linux_sysent[]; > #define MAXSYSCALL LINUX_SYS_MAXSYSCALL > #define SYSCALLNAMES linux_syscallnames > #define SYSENT linux_sysent >+#elif defined(FREEBSD32_SYSTRACE) >+/* >+ * The syscall arguments are processed into a DTrace argument array >+ * using a generated function. See sys/kern/makesyscalls.sh. >+ */ >+#include <compat/freebsd32/freebsd32_proto.h> >+#include <compat/freebsd32/freebsd32_util.h> >+#include <compat/freebsd32/freebsd32_syscall.h> >+#include <compat/freebsd32/freebsd32_systrace_args.c> >+extern const char *freebsd32_syscallnames[]; >+#define DEVNAME "dtrace/systrace32" >+#define PROVNAME "syscall32" >+#define MAXSYSCALL FREEBSD32_SYS_MAXSYSCALL >+#define SYSCALLNAMES freebsd32_syscallnames >+#define SYSENT freebsd32_sysent > #else > /* > * The syscall arguments are processed into a DTrace argument array >@@ -332,6 +347,11 @@ MODULE_DEPEND(linsystrace, linux, 1, 1, 1); > MODULE_DEPEND(linsystrace, systrace, 1, 1, 1); > MODULE_DEPEND(linsystrace, dtrace, 1, 1, 1); > MODULE_DEPEND(linsystrace, opensolaris, 1, 1, 1); >+#elif defined(FREEBSD32_SYSTRACE) >+DEV_MODULE(systrace32, systrace_modevent, NULL); >+MODULE_VERSION(systrace32, 1); >+MODULE_DEPEND(systrace32, dtrace, 1, 1, 1); >+MODULE_DEPEND(systrace32, opensolaris, 1, 1, 1); > #else > DEV_MODULE(systrace, systrace_modevent, NULL); > MODULE_VERSION(systrace, 1); >diff --git a/sys/compat/freebsd32/Makefile b/sys/compat/freebsd32/Makefile >index d9131f2..34d3e81 100644 >--- a/sys/compat/freebsd32/Makefile >+++ b/sys/compat/freebsd32/Makefile >@@ -5,15 +5,17 @@ > all: > @echo "make sysent only" > >-sysent: freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h >+sysent: freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c > >-freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h: \ >+freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \ > ../../kern/makesyscalls.sh syscalls.master syscalls.conf > -mv -f freebsd32_sysent.c freebsd32_sysent.c.bak > -mv -f freebsd32_syscalls.c freebsd32_syscalls.c.bak > -mv -f freebsd32_syscall.h freebsd32_syscall.h.bak > -mv -f freebsd32_proto.h freebsd32_proto.h.bak >+ -mv -f freebsd32_systrace_args.c freebsd32_systrace_args.c.bak > sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf > > clean: > rm -f freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h >+ rm -f freebsd32_systrace_args.c >diff --git a/sys/compat/freebsd32/syscalls.conf b/sys/compat/freebsd32/syscalls.conf >index f163597..3715400 100644 >--- a/sys/compat/freebsd32/syscalls.conf >+++ b/sys/compat/freebsd32/syscalls.conf >@@ -8,4 +8,4 @@ sysmk="/dev/null" > syscallprefix="FREEBSD32_SYS_" > switchname="freebsd32_sysent" > namesname="freebsd32_syscallnames" >-systrace="/dev/null" >+systrace="freebsd32_systrace_args.c" >diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh >index 41a89c6..6a0e938 100644 >--- a/sys/kern/makesyscalls.sh >+++ b/sys/kern/makesyscalls.sh >@@ -190,6 +190,8 @@ s/\$//g > print > syscompat6 > print > syscompat7 > print > sysnames >+ print > systrace >+ print > systracetmp > savesyscall = syscall > next > } >@@ -202,6 +204,8 @@ s/\$//g > print > syscompat6 > print > syscompat7 > print > sysnames >+ print > systrace >+ print > systracetmp > syscall = savesyscall > next > } >@@ -214,6 +218,8 @@ s/\$//g > print > syscompat6 > print > syscompat7 > print > sysnames >+ print > systrace >+ print > systracetmp > next > } > syscall != $1 { >diff --git a/sys/modules/dtrace/systrace32/Makefile b/sys/modules/dtrace/systrace32/Makefile >new file mode 100644 >index 0000000..7d66fa3 >--- /dev/null >+++ b/sys/modules/dtrace/systrace32/Makefile >@@ -0,0 +1,13 @@ >+# $FreeBSD$ >+ >+.PATH: ${.CURDIR}/../../../cddl/dev/systrace >+ >+KMOD= systrace32 >+SRCS= systrace.c >+SRCS+= vnode_if.h >+ >+CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ >+ -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ >+ -I${.CURDIR}/../../.. -DFREEBSD32_SYSTRACE >+ >+.include <bsd.kmod.mk>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 152822
: 111541