lkml.org 
[lkml]   [2018]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: Add caller information to printk() output.
On (12/02/18 20:23), Tetsuo Handa wrote:
>
> Some examples for console output:
>
> [ 0.919699]@T1 x86: Booting SMP configuration:
> [ 4.152681]@T271 Fusion MPT base driver 3.04.20
> [ 5.070470]@C0 random: fast init done
> [ 6.587900]@C3 random: crng init done

This is hard to read. Let's have a fixed width space for from_id.

> +#ifdef CONFIG_PRINTK_FROM
> + if (in_task())
> + msg->from_id = current->pid;

Let's use task_pid_nr().

> -static size_t print_time(u64 ts, char *buf)
> -{
> - unsigned long rem_nsec = do_div(ts, 1000000000);
> -
> - if (!buf)
> - return snprintf(NULL, 0, "[%5lu.000000] ", (unsigned long)ts);
> -
> - return sprintf(buf, "[%5lu.%06lu] ",
> - (unsigned long)ts, rem_nsec / 1000);
> -}

OK, this patch depends on printk_time patch.

> +config PRINTK_FROM
> + bool "Show caller information on printks"
> + depends on PRINTK

Wasn't it supposed to also depend on DEBUG_AID_FOR_SYZBOT?

-ss

\
 
 \ /
  Last update: 2018-12-04 03:03    [W:0.189 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site