lkml.org 
[lkml]   [2011]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] tracing: add trace console
From
Date
On Wed, 2011-11-16 at 17:45 +0100, Johannes Berg wrote:

> I briefly looked at it just after writing the email, but quickly got
> lost in printk.c because of the multi-line handling it has. We could
> instead trace each call to printk(), so the multi-line stuff would end
> up in multiple events, but all of that code is too much vodoo for me :)

Here's what can go into printk.c:

diff --git a/kernel/printk.c b/kernel/printk.c
index 1455a0d..4b8445a 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -542,6 +542,7 @@ MODULE_PARM_DESC(ignore_loglevel, "ignore loglevel setting, to"
static void _call_console_drivers(unsigned start,
unsigned end, int msg_log_level)
{
+ trace_console(&LOG_BUF(start), end - start);
if ((msg_log_level < console_loglevel || ignore_loglevel) &&
console_drivers && start != end) {
if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {

And then you can make a TRACE_EVENT(console) that takes a buffer and a
len, and write that to the ring buffer.

-- Steve




\
 
 \ /
  Last update: 2011-11-16 18:03    [W:0.080 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site