Re: [PATCH] printk: inject caller information into the body of message

From: Steven Rostedt
Date: Thu Sep 13 2018 - 21:24:02 EST


On Thu, 13 Sep 2018 23:28:02 +0900
Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> wrote:

> Good call. It was a fast path for pr_cont("\n").
> But it made me wondering and I did some grepping
>

[..]

> kernel/trace/ftrace.c: pr_cont("\n expected tramp: %lx\n", ip);

Note, looking at the history of that, I was just combining a lone "\n"
with the next string. The code before this print add info to the line
depending on the input, thus none do a "\n". The "expected tramp" part
is added to the next line, but I'm fine if you want to break this up.
This print is very unlikely done with other prints happening. It
happens when modifying (serially) ftrace nops to calls or back to nops.

Feel free to send a patch that breaks it up into:

pr_cont("\n");
pr_info(" expected tramp: %lx\n", ip);

-- Steve