Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1247777

Re: [PATCH] arm64: ftrace: function_graph: dump real return addr in call trace

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] arm64: ftrace: function_graph: dump real return addr in call trace
Date 2015-10-15 15:00 +0200
Message-ID <qjQit-6RK-9@gated-at.bofh.it> (permalink)
References <qjPFL-68P-13@gated-at.bofh.it> <qjQ8N-6Gn-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Oct 15, 2015 at 02:46:16PM +0200, Arnd Bergmann wrote:
> On Thursday 15 October 2015 20:12:35 Li Bin wrote:
> > 
> > +#ifdef CONFIG_FUNCTION_GRAPH_TRACER
> > +static void print_ftrace_graph_addr(unsigned long addr,
> > +                                       struct task_struct *tsk,
> > +                                       unsigned long sp, int *graph)
> > +{
> > +       unsigned long ret_addr;
> > +       int index = tsk->curr_ret_stack;
> > +
> > +       if (addr != ((unsigned long)return_to_handler - 4))
> > +               return;
> > +
> > +       if (!tsk->ret_stack || index < *graph)
> > 
> 
> I think it would be nicer to remove the #ifdef and write this as
> 
> static void print_ftrace_graph_addr(unsigned long addr,
>                                     struct task_struct *tsk,
>                                     unsigned long sp, int *graph)
> {
>        unsigned long ret_addr;
>        int index = tsk->curr_ret_stack;
> 
>        if (!IS_ENABLED(CONFIG_FUNCTION_GRAPH_TRACER))
> 		return;
> 
>        if (addr != ((unsigned long)return_to_handler - 4))
>                return;

Is this the same old problem caused by e306dfd06fcb ("ARM64: unwind: Fix
PC calculation")? I've said previously that I'm happy to revert that if
we're the only architecture with this behaviour, but Akashi resisted
because there are other issues with ftrace that he was hoping to address
and they would resolve this too.

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] arm64: ftrace: function_graph: dump real return addr in call trace Li Bin <huawei.libin@huawei.com> - 2015-10-15 14:20 +0200
  Re: [PATCH] arm64: ftrace: function_graph: dump real return addr in call trace Arnd Bergmann <arnd@arndb.de> - 2015-10-15 14:50 +0200
    Re: [PATCH] arm64: ftrace: function_graph: dump real return addr in  call trace Will Deacon <will.deacon@arm.com> - 2015-10-15 15:00 +0200
      Re: [PATCH] arm64: ftrace: function_graph: dump real return addr in  call trace Steven Rostedt <rostedt@goodmis.org> - 2015-10-15 16:20 +0200

csiph-web