Commit bedbb648 authored by Paul E. McKenney's avatar Paul E. McKenney

rcu: Add TPS() to event-traced strings

Strings used in event tracing need to be specially handled, for example,
using the TPS() macro.  Without the TPS() macro, although output looks
fine from within a running kernel, extracting traces from a crash dump
produces garbage instead of strings.  This commit therefore adds the TPS()
macro to some unadorned strings that were passed to event-tracing macros.
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent ccdd29ff
...@@ -2073,7 +2073,7 @@ static void nocb_leader_wait(struct rcu_data *my_rdp) ...@@ -2073,7 +2073,7 @@ static void nocb_leader_wait(struct rcu_data *my_rdp)
/* Wait for callbacks to appear. */ /* Wait for callbacks to appear. */
if (!rcu_nocb_poll) { if (!rcu_nocb_poll) {
trace_rcu_nocb_wake(my_rdp->rsp->name, my_rdp->cpu, "Sleep"); trace_rcu_nocb_wake(my_rdp->rsp->name, my_rdp->cpu, TPS("Sleep"));
swait_event_interruptible(my_rdp->nocb_wq, swait_event_interruptible(my_rdp->nocb_wq,
!READ_ONCE(my_rdp->nocb_leader_sleep)); !READ_ONCE(my_rdp->nocb_leader_sleep));
raw_spin_lock_irqsave(&my_rdp->nocb_lock, flags); raw_spin_lock_irqsave(&my_rdp->nocb_lock, flags);
...@@ -2083,7 +2083,7 @@ static void nocb_leader_wait(struct rcu_data *my_rdp) ...@@ -2083,7 +2083,7 @@ static void nocb_leader_wait(struct rcu_data *my_rdp)
raw_spin_unlock_irqrestore(&my_rdp->nocb_lock, flags); raw_spin_unlock_irqrestore(&my_rdp->nocb_lock, flags);
} else if (firsttime) { } else if (firsttime) {
firsttime = false; /* Don't drown trace log with "Poll"! */ firsttime = false; /* Don't drown trace log with "Poll"! */
trace_rcu_nocb_wake(my_rdp->rsp->name, my_rdp->cpu, "Poll"); trace_rcu_nocb_wake(my_rdp->rsp->name, my_rdp->cpu, TPS("Poll"));
} }
/* /*
...@@ -2111,7 +2111,7 @@ static void nocb_leader_wait(struct rcu_data *my_rdp) ...@@ -2111,7 +2111,7 @@ static void nocb_leader_wait(struct rcu_data *my_rdp)
schedule_timeout_interruptible(1); schedule_timeout_interruptible(1);
} else { } else {
trace_rcu_nocb_wake(my_rdp->rsp->name, my_rdp->cpu, trace_rcu_nocb_wake(my_rdp->rsp->name, my_rdp->cpu,
"WokeEmpty"); TPS("WokeEmpty"));
} }
goto wait_again; goto wait_again;
} }
...@@ -2155,7 +2155,7 @@ static void nocb_leader_wait(struct rcu_data *my_rdp) ...@@ -2155,7 +2155,7 @@ static void nocb_leader_wait(struct rcu_data *my_rdp)
static void nocb_follower_wait(struct rcu_data *rdp) static void nocb_follower_wait(struct rcu_data *rdp)
{ {
for (;;) { for (;;) {
trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, "FollowerSleep"); trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("FollowerSleep"));
swait_event_interruptible(rdp->nocb_wq, swait_event_interruptible(rdp->nocb_wq,
READ_ONCE(rdp->nocb_follower_head)); READ_ONCE(rdp->nocb_follower_head));
if (smp_load_acquire(&rdp->nocb_follower_head)) { if (smp_load_acquire(&rdp->nocb_follower_head)) {
...@@ -2163,7 +2163,7 @@ static void nocb_follower_wait(struct rcu_data *rdp) ...@@ -2163,7 +2163,7 @@ static void nocb_follower_wait(struct rcu_data *rdp)
return; return;
} }
WARN_ON(signal_pending(current)); WARN_ON(signal_pending(current));
trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, "WokeEmpty"); trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("WokeEmpty"));
} }
} }
...@@ -2198,7 +2198,7 @@ static int rcu_nocb_kthread(void *arg) ...@@ -2198,7 +2198,7 @@ static int rcu_nocb_kthread(void *arg)
rdp->nocb_follower_tail = &rdp->nocb_follower_head; rdp->nocb_follower_tail = &rdp->nocb_follower_head;
raw_spin_unlock_irqrestore(&rdp->nocb_lock, flags); raw_spin_unlock_irqrestore(&rdp->nocb_lock, flags);
BUG_ON(!list); BUG_ON(!list);
trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, "WokeNonEmpty"); trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, TPS("WokeNonEmpty"));
/* Each pass through the following loop invokes a callback. */ /* Each pass through the following loop invokes a callback. */
trace_rcu_batch_start(rdp->rsp->name, trace_rcu_batch_start(rdp->rsp->name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment