Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467970

[PATCH tip/core/rcu 4/5] rcuperf: Insert space between flag and message consistently

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH tip/core/rcu 4/5] rcuperf: Insert space between flag and message consistently
Date 2016-08-22 21:20 +0200
Message-ID <s92Vk-1VN-19@gated-at.bofh.it> (permalink)
References <s90Aa-iZ-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: SeongJae Park <sj38.park@gmail.com>

Few output messages of rcuperf has no space between flag and start of
message while every other messages keeps a space consistently.  It makes
output messages to be inconsistent and weird especially when it be read
by dmesg with color option enabled.  This commit fixes the problem by
modifying a pr_alert() call and PERFOUT_STRING() macro function.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcu/rcuperf.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
index d38ab08a3fe7..123ccbd22449 100644
--- a/kernel/rcu/rcuperf.c
+++ b/kernel/rcu/rcuperf.c
@@ -52,7 +52,7 @@ MODULE_AUTHOR("Paul E. McKenney <paulmck@linux.vnet.ibm.com>");
 
 #define PERF_FLAG "-perf:"
 #define PERFOUT_STRING(s) \
-	pr_alert("%s" PERF_FLAG s "\n", perf_type)
+	pr_alert("%s" PERF_FLAG " %s\n", perf_type, s)
 #define VERBOSE_PERFOUT_STRING(s) \
 	do { if (verbose) pr_alert("%s" PERF_FLAG " %s\n", perf_type, s); } while (0)
 #define VERBOSE_PERFOUT_ERRSTRING(s) \
@@ -400,9 +400,8 @@ rcu_perf_writer(void *arg)
 			sp.sched_priority = 0;
 			sched_setscheduler_nocheck(current,
 						   SCHED_NORMAL, &sp);
-			pr_alert("%s" PERF_FLAG
-				 "rcu_perf_writer %ld has %d measurements\n",
-				 perf_type, me, MIN_MEAS);
+			pr_alert("%s%s rcu_perf_writer %ld has %d measurements\n",
+				 perf_type, PERF_FLAG, me, MIN_MEAS);
 			if (atomic_inc_return(&n_rcu_perf_writer_finished) >=
 			    nrealwriters) {
 				schedule_timeout_interruptible(10);
-- 
2.5.2

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH tip/core/rcu 0/5] Torture-test updates for 4.9 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 20:30 +0200
  [PATCH tip/core/rcu 4/5] rcuperf: Insert space between flag and message consistently "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 21:20 +0200
  [PATCH tip/core/rcu 3/5] rcutorture: Print out barrier error as document says "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 21:40 +0200
  [PATCH tip/core/rcu 1/5] torture: Convert torture_shutdown() to hrtimer "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 22:00 +0200

csiph-web