lkml.org 
[lkml]   [2017]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 2/5] usb: early: add driver for xhci debug capability
On Thu, 1 Jun 2017 14:25:51 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> On Thu, Jun 01, 2017 at 10:15:24AM +0200, Vlastimil Babka wrote:
> > Thanks. I didn't make it clear that the trace_printk() warning is
> > there even if the code using it doesn't actually execute (i.e. I
> > didn't specify any early_printk bootparam). There are some roastedy
> > tricks to detect the potential users, so that the buffers can be
> > allocated in advance to allow the first trace_printk() from any
> > context, I guess.
> >
> > I'm not sure if there's a way to change it so that your driver
> > reports the trace_printk usage only in response to the bootparam
> > (which could also be a safe point to allocate ftrace buffers?).
>
> No, nor do we want to. There should not be a single caller to
> trace_printk() in normal kernels.

Correct. If you find a trace_printk() that would be useful in a
production environment, then make it a tracepoint.

That's why I have that nasty banner, to make sure trace_printk()s are
not the "quick way" to add tracepoint hacks.

-- Steve

\
 
 \ /
  Last update: 2017-06-05 00:07    [W:0.951 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site