tracing/syscalls: Early terminate search for sys_ni_syscall
authorIan Munsie <imunsie@au1.ibm.com>
Thu, 3 Feb 2011 03:27:25 +0000 (14:27 +1100)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 8 Feb 2011 02:30:14 +0000 (21:30 -0500)
Many system calls are unimplemented and mapped to sys_ni_syscall, but at
boot ftrace would still search through every syscall metadata entry for
a match which wouldn't be there.

This patch adds causes the search to terminate early if the system call
is not mapped.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
LKML-Reference: <1296703645-18718-7-git-send-email-imunsie@au1.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_syscalls.c

index 86a23e7de031fe1f9d21bab64e1c8080729ac6df..ee7b5a0bb9f87c1b9abb5964bfd4c54fd99ccb2d 100644 (file)
@@ -85,6 +85,9 @@ find_syscall_meta(unsigned long syscall)
        stop = __stop_syscalls_metadata;
        kallsyms_lookup(syscall, NULL, NULL, NULL, str);
 
+       if (arch_syscall_match_sym_name(str, "sys_ni_syscall"))
+               return NULL;
+
        for ( ; start < stop; start++) {
                if ((*start)->name && arch_syscall_match_sym_name(str, (*start)->name))
                        return *start;