[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171204135314.9122-5-sergey.senozhatsky@gmail.com>
Date: Mon, 4 Dec 2017 22:53:14 +0900
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>,
Petr Mladek <pmladek@...e.com>
Cc: Jan Kara <jack@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Rafael Wysocki <rjw@...ysocki.net>,
Pavel Machek <pavel@....cz>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: [PATCH 4/4] printk: add task name and CPU to console messages
*** FOR TESTING ***
Add current->comm/smp_processor_id() prefix to every console line.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
---
kernel/printk/printk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index a34a839e6045..a36cc6b9148e 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1540,6 +1540,9 @@ static size_t print_prefix(const struct printk_log *msg, bool syslog, char *buf)
}
}
+ if (buf)
+ len += sprintf(buf, "{%s/%d}", current->comm,
+ smp_processor_id());
len += print_time(msg->ts_nsec, buf ? buf + len : NULL);
return len;
}
--
2.15.1
Powered by blists - more mailing lists