aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-07-12 16:50:28 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-07-29 17:07:49 -0400
commite66c33d579ea566d10e8c8695a7168aae3e02992 (patch)
treeb316d091004d823319afb6995539d4ad09386296 /kernel/rcutree.c
parent102c9323c35a83789ad5ebd3c45fa8fb389add88 (diff)
rcu: Add const annotation to char * for RCU tracepoints and functions
All the RCU tracepoints and functions that reference char pointers do so with just 'char *' even though they do not modify the contents of the string itself. This will cause warnings if a const char * is used in one of these functions. The RCU tracepoints store the pointer to the string to refer back to them when the trace output is displayed. As this can be minutes, hours or even days later, those strings had better be constant. This change also opens the door to allow the RCU tracepoint strings and their addresses to be exported so that userspace tracing tools can translate the contents of the pointers of the RCU tracepoints. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 068de3a93606..30201494560b 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1032,7 +1032,7 @@ static unsigned long rcu_cbs_completed(struct rcu_state *rsp,
1032 * rcu_nocb_wait_gp(). 1032 * rcu_nocb_wait_gp().
1033 */ 1033 */
1034static void trace_rcu_future_gp(struct rcu_node *rnp, struct rcu_data *rdp, 1034static void trace_rcu_future_gp(struct rcu_node *rnp, struct rcu_data *rdp,
1035 unsigned long c, char *s) 1035 unsigned long c, const char *s)
1036{ 1036{
1037 trace_rcu_future_grace_period(rdp->rsp->name, rnp->gpnum, 1037 trace_rcu_future_grace_period(rdp->rsp->name, rnp->gpnum,
1038 rnp->completed, c, rnp->level, 1038 rnp->completed, c, rnp->level,
@@ -2720,7 +2720,7 @@ static int rcu_cpu_has_callbacks(int cpu, bool *all_lazy)
2720 * Helper function for _rcu_barrier() tracing. If tracing is disabled, 2720 * Helper function for _rcu_barrier() tracing. If tracing is disabled,
2721 * the compiler is expected to optimize this away. 2721 * the compiler is expected to optimize this away.
2722 */ 2722 */
2723static void _rcu_barrier_trace(struct rcu_state *rsp, char *s, 2723static void _rcu_barrier_trace(struct rcu_state *rsp, const char *s,
2724 int cpu, unsigned long done) 2724 int cpu, unsigned long done)
2725{ 2725{
2726 trace_rcu_barrier(rsp->name, s, cpu, 2726 trace_rcu_barrier(rsp->name, s, cpu,