]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS, Tracing: Fix set_graph_function of function graph tracer
authorWu Zhangjin <wuzhangjin@gmail.com>
Fri, 21 Jan 2011 18:01:53 +0000 (02:01 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 14 Mar 2011 20:07:24 +0000 (21:07 +0100)
commitbb5043af5e6fd1e42d8ab10145c1057310c938b4
tree1b52def8282e9faa067acb9fc360cbc10ff03fc1
parent893d3d7db35b218bfc4a00b3d9b98e34a8aac02a
MIPS, Tracing: Fix set_graph_function of function graph tracer

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>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2017/
Signed-off-by: Ralf Baechle <ralf@duck.linux-mips.net>
arch/mips/kernel/ftrace.c