From: Kris Van Hees Date: Tue, 20 Sep 2011 06:56:56 +0000 (-0400) Subject: dtrace: changes in how we collect the names of system calls X-Git-Tag: v4.1.12-92~313^2~170 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=472dadf03cb60f36365d565f34e3ecefd700099f;p=users%2Fjedix%2Flinux-maple.git dtrace: changes in how we collect the names of system calls We used to use the ftrace syscall meta info and the nr-to-meta functionality. Now we populate the systrace info structure statically at kernel compile time. This means that the DTrace code no longer depends on ftrace. Signed-off-by: Kris Van Hees --- diff --git a/kernel/dtrace/dtrace_os.c b/kernel/dtrace/dtrace_os.c index 53184b983c35..e2af50963f78 100644 --- a/kernel/dtrace/dtrace_os.c +++ b/kernel/dtrace/dtrace_os.c @@ -159,8 +159,6 @@ void cyclic_remove(cyclic_id_t id) } EXPORT_SYMBOL(cyclic_remove); -static systrace_info_t systrace_info; - void (*systrace_probe)(dtrace_id_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); @@ -170,11 +168,32 @@ void systrace_stub(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, { } +asmlinkage long systrace_syscall(uintptr_t, uintptr_t, + uintptr_t, uintptr_t, + uintptr_t, uintptr_t); + +static systrace_info_t systrace_info = { + &systrace_probe, + systrace_stub, + systrace_syscall, + { +/* + * Need to remove the define for _ASM_X86_UNISTD_64_H in order for unistd_64 + * to be included here because it was already included indirectly. + */ +#undef __SYSCALL +#define __SYSCALL(nr, sym) [nr] { __stringify(sym), }, +#undef _ASM_X86_UNISTD_64_H +#include + } + }; + + asmlinkage long systrace_syscall(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5) { - long rc; + long rc = 0; unsigned long sysnum; dtrace_id_t id; dtrace_syscalls_t *sc;