From 8acd018cbb8f4c82413d7e26cf19385601488b50 Mon Sep 17 00:00:00 2001 From: "Steven Rostedt (Red Hat)" Date: Wed, 27 Mar 2013 09:31:28 -0400 Subject: [PATCH] --- yaml --- r: 362319 b: refs/heads/master c: 395b97a3aeff0b8d949ee3e67bf8c11c5ffd6861 h: refs/heads/master i: 362317: 3d3456295ff2f1cebc20c201d714fab53cf63ef1 362315: e4566bf404ac04c30d1d3746b91bb8f350da1ad9 362311: 3c889c2e5efdfd8660bccb287a464aecfef18b8e 362303: d59abd298ced32084f97dcb3ae7293eb7e078af1 v: v3 --- [refs] | 2 +- trunk/include/linux/ftrace.h | 2 ++ trunk/kernel/trace/ftrace.c | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 144859b27034..f60bbfe0d3ba 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5000c418840b309251c5887f0b56503aae30f84c +refs/heads/master: 395b97a3aeff0b8d949ee3e67bf8c11c5ffd6861 diff --git a/trunk/include/linux/ftrace.h b/trunk/include/linux/ftrace.h index e5ca8ef50e9b..167abf907802 100644 --- a/trunk/include/linux/ftrace.h +++ b/trunk/include/linux/ftrace.h @@ -89,6 +89,7 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip, * that the call back has its own recursion protection. If it does * not set this, then the ftrace infrastructure will add recursion * protection for the caller. + * STUB - The ftrace_ops is just a place holder. */ enum { FTRACE_OPS_FL_ENABLED = 1 << 0, @@ -98,6 +99,7 @@ enum { FTRACE_OPS_FL_SAVE_REGS = 1 << 4, FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5, FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6, + FTRACE_OPS_FL_STUB = 1 << 7, }; struct ftrace_ops { diff --git a/trunk/kernel/trace/ftrace.c b/trunk/kernel/trace/ftrace.c index cc4943c7ce6d..7e897106b7e0 100644 --- a/trunk/kernel/trace/ftrace.c +++ b/trunk/kernel/trace/ftrace.c @@ -66,7 +66,7 @@ static struct ftrace_ops ftrace_list_end __read_mostly = { .func = ftrace_stub, - .flags = FTRACE_OPS_FL_RECURSION_SAFE, + .flags = FTRACE_OPS_FL_RECURSION_SAFE | FTRACE_OPS_FL_STUB, }; /* ftrace_enabled is a method to turn ftrace on or off */ @@ -4131,7 +4131,8 @@ ftrace_ops_control_func(unsigned long ip, unsigned long parent_ip, preempt_disable_notrace(); trace_recursion_set(TRACE_CONTROL_BIT); do_for_each_ftrace_op(op, ftrace_control_list) { - if (!ftrace_function_local_disabled(op) && + if (!(op->flags & FTRACE_OPS_FL_STUB) && + !ftrace_function_local_disabled(op) && ftrace_ops_test(op, ip)) op->func(ip, parent_ip, op, regs); } while_for_each_ftrace_op(op);