mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
ftrace: Return pt_regs to function trace callback
Return as the 4th paramater to the function tracer callback the pt_regs. Later patches that implement regs passing for the architectures will require having the ftrace_ops set the SAVE_REGS flag, which will tell the arch to take the time to pass a full set of pt_regs to the ftrace_ops callback function. If the arch does not support it then it should pass NULL. If an arch can pass full regs, then it should define: ARCH_SUPPORTS_FTRACE_SAVE_REGS to 1 Link: http://lkml.kernel.org/r/20120702201821.019966811@goodmis.org Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
ccf3672d53
commit
a1e2e31d17
9 changed files with 47 additions and 30 deletions
|
@ -104,7 +104,8 @@ static inline void warn_failed_init_tracer(struct tracer *trace, int init_ret)
|
|||
static int trace_selftest_test_probe1_cnt;
|
||||
static void trace_selftest_test_probe1_func(unsigned long ip,
|
||||
unsigned long pip,
|
||||
struct ftrace_ops *op)
|
||||
struct ftrace_ops *op,
|
||||
struct pt_regs *pt_regs)
|
||||
{
|
||||
trace_selftest_test_probe1_cnt++;
|
||||
}
|
||||
|
@ -112,7 +113,8 @@ static void trace_selftest_test_probe1_func(unsigned long ip,
|
|||
static int trace_selftest_test_probe2_cnt;
|
||||
static void trace_selftest_test_probe2_func(unsigned long ip,
|
||||
unsigned long pip,
|
||||
struct ftrace_ops *op)
|
||||
struct ftrace_ops *op,
|
||||
struct pt_regs *pt_regs)
|
||||
{
|
||||
trace_selftest_test_probe2_cnt++;
|
||||
}
|
||||
|
@ -120,7 +122,8 @@ static void trace_selftest_test_probe2_func(unsigned long ip,
|
|||
static int trace_selftest_test_probe3_cnt;
|
||||
static void trace_selftest_test_probe3_func(unsigned long ip,
|
||||
unsigned long pip,
|
||||
struct ftrace_ops *op)
|
||||
struct ftrace_ops *op,
|
||||
struct pt_regs *pt_regs)
|
||||
{
|
||||
trace_selftest_test_probe3_cnt++;
|
||||
}
|
||||
|
@ -128,7 +131,8 @@ static void trace_selftest_test_probe3_func(unsigned long ip,
|
|||
static int trace_selftest_test_global_cnt;
|
||||
static void trace_selftest_test_global_func(unsigned long ip,
|
||||
unsigned long pip,
|
||||
struct ftrace_ops *op)
|
||||
struct ftrace_ops *op,
|
||||
struct pt_regs *pt_regs)
|
||||
{
|
||||
trace_selftest_test_global_cnt++;
|
||||
}
|
||||
|
@ -136,7 +140,8 @@ static void trace_selftest_test_global_func(unsigned long ip,
|
|||
static int trace_selftest_test_dyn_cnt;
|
||||
static void trace_selftest_test_dyn_func(unsigned long ip,
|
||||
unsigned long pip,
|
||||
struct ftrace_ops *op)
|
||||
struct ftrace_ops *op,
|
||||
struct pt_regs *pt_regs)
|
||||
{
|
||||
trace_selftest_test_dyn_cnt++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue