From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Hendrik Brueckner <brueckner@linux.vnet.ibm.com>,
Jason Baron <jbaron@redhat.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
Jiaying Zhang <jiayingz@google.com>,
Martin Bligh <mbligh@google.com>, Li Zefan <lizf@cn.fujitsu.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 1/7] tracing: Add syscall tracepoints - s390 arch update
Date: Thu, 27 Aug 2009 19:50:02 +0200 [thread overview]
Message-ID: <20090827175000.GA6032@nowhere> (raw)
In-Reply-To: <1251395015-6329-2-git-send-email-fweisbec@gmail.com>
Oh, I forgot to put the
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> on this one.
Sorry...
On Thu, Aug 27, 2009 at 07:43:29PM +0200, Frederic Weisbecker wrote:
> From: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
>
> This patch includes s390 arch updates to synchronize with latest
> core changes in the syscalls tracing area.
>
> - tracing: Map syscall name to number (syscall_name_to_nr())
> - tracing: Call arch_init_ftrace_syscalls at boot
> - tracing: add support tracepoint ids (set_syscall_{enter,exit}_id())
>
> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
> Cc: Jason Baron <jbaron@redhat.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> Cc: Jiaying Zhang <jiayingz@google.com>
> Cc: Martin Bligh <mbligh@google.com>
> Cc: Li Zefan <lizf@cn.fujitsu.com>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Paul Mundt <lethal@linux-sh.org>
> LKML-Reference: <20090825123111.GD4639@cetus.boeblingen.de.ibm.com>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
> arch/s390/kernel/ftrace.c | 36 +++++++++++++++++++++++++++---------
> 1 files changed, 27 insertions(+), 9 deletions(-)
>
> diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c
> index 3e298e6..57bdcb1 100644
> --- a/arch/s390/kernel/ftrace.c
> +++ b/arch/s390/kernel/ftrace.c
> @@ -220,6 +220,29 @@ struct syscall_metadata *syscall_nr_to_meta(int nr)
> return syscalls_metadata[nr];
> }
>
> +int syscall_name_to_nr(char *name)
> +{
> + int i;
> +
> + if (!syscalls_metadata)
> + return -1;
> + for (i = 0; i < NR_syscalls; i++)
> + if (syscalls_metadata[i])
> + if (!strcmp(syscalls_metadata[i]->name, name))
> + return i;
> + return -1;
> +}
> +
> +void set_syscall_enter_id(int num, int id)
> +{
> + syscalls_metadata[num]->enter_id = id;
> +}
> +
> +void set_syscall_exit_id(int num, int id)
> +{
> + syscalls_metadata[num]->exit_id = id;
> +}
> +
> static struct syscall_metadata *find_syscall_meta(unsigned long syscall)
> {
> struct syscall_metadata *start;
> @@ -237,24 +260,19 @@ static struct syscall_metadata *find_syscall_meta(unsigned long syscall)
> return NULL;
> }
>
> -void arch_init_ftrace_syscalls(void)
> +static int __init arch_init_ftrace_syscalls(void)
> {
> struct syscall_metadata *meta;
> int i;
> - static atomic_t refs;
> -
> - if (atomic_inc_return(&refs) != 1)
> - goto out;
> syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) * NR_syscalls,
> GFP_KERNEL);
> if (!syscalls_metadata)
> - goto out;
> + return -ENOMEM;
> for (i = 0; i < NR_syscalls; i++) {
> meta = find_syscall_meta((unsigned long)sys_call_table[i]);
> syscalls_metadata[i] = meta;
> }
> - return;
> -out:
> - atomic_dec(&refs);
> + return 0;
> }
> +arch_initcall(arch_init_ftrace_syscalls);
> #endif
> --
> 1.6.2.3
>
next prev parent reply other threads:[~2009-08-27 17:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 17:43 [GIT PULL] tracing/syscalls: The next bunch Frederic Weisbecker
2009-08-27 17:43 ` [PATCH 1/7] tracing: Add syscall tracepoints - s390 arch update Frederic Weisbecker
2009-08-27 17:50 ` Frederic Weisbecker [this message]
2009-08-27 17:43 ` [PATCH 2/7] tracing: Check invalid syscall nr while tracing syscalls Frederic Weisbecker
2009-08-27 17:43 ` [PATCH 3/7] tracing: Don't trace kernel thread syscalls Frederic Weisbecker
2009-08-27 17:43 ` [PATCH 4/7] tracing: Define NR_syscalls for x86 (32) Frederic Weisbecker
2009-08-27 17:43 ` [PATCH 5/7] tracing: Define NR_syscalls for x86_64 Frederic Weisbecker
2009-08-27 17:43 ` [PATCH 6/7] tracing: Convert event tracing code to use NR_syscalls Frederic Weisbecker
2009-08-27 17:43 ` [PATCH 7/7] tracing: Remove FTRACE_SYSCALL_MAX definitions Frederic Weisbecker
2009-08-29 10:43 ` [GIT PULL] tracing/syscalls: The next bunch Ingo Molnar
2009-08-29 23:33 ` Frederic Weisbecker
2009-08-31 8:35 ` Ingo Molnar
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=20090827175000.GA6032@nowhere \
--to=fweisbec@gmail.com \
--cc=brueckner@linux.vnet.ibm.com \
--cc=jbaron@redhat.com \
--cc=jiayingz@google.com \
--cc=laijs@cn.fujitsu.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mbligh@google.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=schwidefsky@de.ibm.com \
/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