From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Steven Rostedt <srostedt@redhat.com>,
linux-mips@linux-mips.org
Subject: Re: [v2 PATCH 5/5] tracing, MIPS: Fix set_graph_function of function graph tracer
Date: Fri, 21 Jan 2011 20:35:41 +0300 [thread overview]
Message-ID: <4D39C3ED.4020401@mvista.com> (raw)
In-Reply-To: <1295630970-32044-1-git-send-email-wuzhangjin@gmail.com>
Hello.
Wu Zhangjin wrote:
> trace.func should be set to the recorded ip of the mcount calling site
> in the __mcount_loc section to filter the function entries configured
> through the tracing/set_graph_function interface, but before, this is
> set to the self_ra(the return address of mcount), which has made
> set_graph_function not work as expected.
> This fixes it via calculating the right recorded ip in the __mcount_loc
> section and assign it to trace.func.
> Reported-by: Zhiping Zhong <xzhong86@163.com>
> Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
> ---
> arch/mips/kernel/ftrace.c | 11 +++++++++--
> 1 files changed, 9 insertions(+), 2 deletions(-)
> diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
> index bc91e4a..be3fa7a 100644
> --- a/arch/mips/kernel/ftrace.c
> +++ b/arch/mips/kernel/ftrace.c
[...]
> @@ -304,7 +304,14 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
> return;
> }
>
> - trace.func = self_ra;
> + /*
> + * Get the recorded ip of the current mcount calling site in the
> + * __mcount_loc section, which will be used to filter the function
> + * entries configured through the tracing/set_graph_function interface.
> + */
> +
> + insns = (in_kernel_space(self_ra)) ? 2 : MCOUNT_OFFSET_INSNS + 1;
You're still keeping the parens around the function call. Why? :-)
WBR, Sergei
next prev parent reply other threads:[~2011-01-21 17:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 17:29 [v2 PATCH 5/5] tracing, MIPS: Fix set_graph_function of function graph tracer Wu Zhangjin
2011-01-21 17:35 ` Sergei Shtylyov [this message]
2011-01-21 18:00 ` wu zhangjin
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=4D39C3ED.4020401@mvista.com \
--to=sshtylyov@mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=srostedt@redhat.com \
--cc=wuzhangjin@gmail.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.