]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: changes in how we collect the names of system calls
authorKris Van Hees <kris.van.hees@oracle.com>
Tue, 20 Sep 2011 06:56:56 +0000 (02:56 -0400)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:39:55 +0000 (22:39 +0100)
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 <kris.van.hees@oracle.com>
kernel/dtrace/dtrace_os.c

index 53184b983c35ffab261e3404d00056236882f0b9..e2af50963f78613388b10b098a20fc20c94ae328 100644 (file)
@@ -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 <asm/unistd_64.h>
+                                           }
+                                       };
+
+
 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;