[RFC][PATCH 8/8] rcu/ftrace: Add FTRACE_UNSAFE_RCU() to unsafe RCU functions

From: Steven Rostedt
Date: Fri Aug 30 2013 - 09:26:17 EST


From: "Steven Rostedt (Red Hat)" <rostedt@xxxxxxxxxxx>

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/rcutree.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 068de3a..9abf305 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -53,6 +53,7 @@
#include <linux/delay.h>
#include <linux/stop_machine.h>
#include <linux/random.h>
+#include <linux/ftrace.h>

#include "rcutree.h"
#include <trace/events/rcu.h>
@@ -373,6 +374,7 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval,
rcu_lockdep_assert(!lock_is_held(&rcu_sched_lock_map),
"Illegal idle entry in RCU-sched read-side critical section.");
}
+FTRACE_UNSAFE_RCU(rcu_eqs_enter_common);

/*
* Enter an RCU extended quiescent state, which can be either the
@@ -392,6 +394,7 @@ static void rcu_eqs_enter(bool user)
rdtp->dynticks_nesting -= DYNTICK_TASK_NEST_VALUE;
rcu_eqs_enter_common(rdtp, oldval, user);
}
+FTRACE_UNSAFE_RCU(rcu_eqs_enter);

/**
* rcu_idle_enter - inform RCU that current CPU is entering idle
@@ -565,6 +568,7 @@ void rcu_user_exit(void)
{
rcu_eqs_exit(1);
}
+FTRACE_UNSAFE_RCU(rcu_user_exit);

/**
* rcu_user_exit_after_irq - inform RCU that we won't resume to userspace
--
1.7.10.4


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