public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ian Munsie <imunsie@au1.ibm.com>
Subject: [PATCH 05/10] tracing/syscalls: Early terminate search for sys_ni_syscall
Date: Tue, 08 Feb 2011 17:16:17 -0500	[thread overview]
Message-ID: <20110208221720.077315754@goodmis.org> (raw)
In-Reply-To: 20110208221612.084294240@goodmis.org

[-- Attachment #1: 0005-tracing-syscalls-Early-terminate-search-for-sys_ni_s.patch --]
[-- Type: text/plain, Size: 1119 bytes --]

From: Ian Munsie <imunsie@au1.ibm.com>

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 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 86a23e7..ee7b5a0 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -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;
-- 
1.7.2.3



  parent reply	other threads:[~2011-02-08 22:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 22:16 [PATCH 00/10] [GIT PULL][v2.6.39] tracing: updates Steven Rostedt
2011-02-08 22:16 ` [PATCH 01/10] tracing/syscalls: Dont add events for unmapped syscalls Steven Rostedt
2011-02-08 22:16 ` [PATCH 02/10] tracing/syscalls: Convert redundant syscall_nr checks into WARN_ON Steven Rostedt
2011-02-08 22:16 ` [PATCH 03/10] tracing/syscalls: Make arch_syscall_addr weak Steven Rostedt
2011-02-08 22:16 ` [PATCH 04/10] tracing/syscalls: Allow arch specific syscall symbol matching Steven Rostedt
2011-02-08 22:16 ` Steven Rostedt [this message]
2011-02-08 22:16 ` [PATCH 06/10] tracing: Add unstable sched clock note to the warning Steven Rostedt
2011-02-08 22:16 ` [PATCH 07/10] trivial: Fix Stevens Copyright typos Steven Rostedt
2011-02-08 22:16 ` [PATCH 08/10] tracing: Compile time initialization for event flags value Steven Rostedt
2011-02-08 22:16 ` [PATCH 09/10] tracing: Remove obsolete sched_switch tracer Steven Rostedt
2011-02-14 19:42   ` Steven Rostedt
2011-02-08 22:16 ` [PATCH 10/10] tracing: Deprecate tracing_enabled for tracing_on Steven Rostedt
2011-02-17 13:50 ` [PATCH 00/10] [GIT PULL][v2.6.39] tracing: updates Ingo Molnar
2011-02-17 14:04   ` Ingo Molnar
2011-02-17 14:55     ` Ingo Molnar
2011-02-17 15:03     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110208221720.077315754@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=imunsie@au1.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox