]> git.karo-electronics.de Git - mv-sheeva.git/commit
MIPS, Tracing: Clean up prepare_ftrace_return()
authorWu Zhangjin <wuzhangjin@gmail.com>
Wed, 19 Jan 2011 19:28:30 +0000 (03:28 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 14 Mar 2011 20:07:24 +0000 (21:07 +0100)
commit2816e325969396af5bd1d5f70c7360074ae1d63c
tree229cc2f5bed2e39ac1ff8ae46b9d1e82b2060b32
parentd9cdb2f1038143c945fcb1a366aae4fa2998419e
MIPS, Tracing: Clean up prepare_ftrace_return()

The old prepare_ftrace_return() for MIPS is confused and have introduced
some problem. This patch cleans up the names of the arguments, variables
and related functions.

For MIPS, the 2nd argument of prepare_ftrace_return() is not really the
'selfpc' described in ftrace-design.txt but instead it is the self
return address. This did break the compatibility of the generic
interface but really reduced one unneeded calculation for to get the
current function name, the parent return address and the self return
address are enough, no need to tranform the self return address to the
self address.

But set_graph_function of function graph tracer is an exception, it does
need the 2nd argument of prepare_ftrace_return() as 'selfpc', for it
will use 'selfpc' to match user's configuration of function graph
entries, but in reality, it doesn't need the 'selfpc' but the recorded
ip address of the mcount calling site in the __mcount_loc section. So,
the 2nd argument of prepare_ftrace_return() is not important, the real
requirement is the right recorded ip address should be calculated and
assign to trace.func, this will be fixed in the next patches.

Reported-by: Zhiping Zhong <xzhong86@163.com>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2007/
Signed-off-by: Ralf Baechle <ralf@duck.linux-mips.net>
arch/mips/kernel/ftrace.c