From: Frederic Weisbecker <fweisbec@gmail.com>
To: Tim Bird <tim.bird@am.sony.com>
Cc: Tony Lindgren <tony@atomide.com>,
Russell King <rmk@arm.linux.org.uk>,
linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
linux kernel <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 2/2] ftrace - add ftrace function_graph support on ARM
Date: Sat, 6 Mar 2010 04:28:13 +0100 [thread overview]
Message-ID: <20100306032811.GI5244@nowhere> (raw)
In-Reply-To: <4B91A25E.5030707@am.sony.com>
On Fri, Mar 05, 2010 at 04:31:26PM -0800, Tim Bird wrote:
> +++ b/arch/arm/kernel/ftrace_graph.c
> @@ -0,0 +1,46 @@
> +/*
> + * function graph tracing support.
> + *
> + * Copyright (C) 2009 Tim Bird <tim.bird@am.sony.com>
> + *
> + * For licencing details, see COPYING.
> + *
> + * Defines routine needed for ARM return trampoline for tracing
> + * function exits.
> + */
> +
> +#include <linux/ftrace.h>
> +
> +/*
> + * Hook the return address and push it in the stack of return addrs
> + * in current thread info.
> + */
> +void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
> + unsigned long frame_pointer)
> +{
> + unsigned long old;
> +
> + struct ftrace_graph_ent trace;
> + unsigned long return_hooker = (unsigned long)
> + &return_to_handler;
> +
> + if (unlikely(atomic_read(¤t->tracing_graph_pause)))
> + return;
> +
> + old = *parent;
> + *parent = return_hooker;
> +
> + if (ftrace_push_return_trace(old, self_addr, &trace.depth,
> + frame_pointer) == -EBUSY) {
> + *parent = old;
> + return;
> + }
> +
> + trace.func = self_addr;
> +
> + /* Only trace if the calling function expects to */
> + if (!ftrace_graph_entry(&trace)) {
> + current->curr_ret_stack--;
> + *parent = old;
> + }
> +}
This could have been done in ftrace.c
Other than that,
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Thanks.
next prev parent reply other threads:[~2010-03-06 3:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 0:31 [PATCH 2/2] ftrace - add ftrace function_graph support on ARM Tim Bird
2010-03-06 3:28 ` Frederic Weisbecker [this message]
2010-10-09 17:43 ` Rabin Vincent
2010-10-09 17:43 ` Rabin Vincent
-- strict thread matches above, loose matches on Subject: below --
2010-03-06 0:36 Tim Bird
2010-03-06 0:36 ` Tim Bird
2010-03-06 20:18 ` Russell King - ARM Linux
2010-03-06 20:18 ` Russell King - ARM Linux
2010-10-09 17:50 ` Rabin Vincent
2010-10-09 17:50 ` Rabin Vincent
2010-10-09 19:37 ` Russell King - ARM Linux
2010-10-09 19:37 ` Russell King - ARM Linux
2010-10-10 22:06 ` Rabin Vincent
2010-10-10 22:06 ` Rabin Vincent
2010-10-11 8:25 ` Russell King - ARM Linux
2010-10-11 8:25 ` Russell King - ARM Linux
2010-10-11 17:15 ` Rabin Vincent
2010-10-11 17:15 ` Rabin Vincent
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=20100306032811.GI5244@nowhere \
--to=fweisbec@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=rostedt@goodmis.org \
--cc=tim.bird@am.sony.com \
--cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.