Peter,

On Wed, Dec 12, 2018 at 10:04:25AM +0800, Peter Chen wrote:

[snip]

> > >I strongly advise against using dev_dbg() for debugging. Even more so
> > >inside your IRQ handler.
> 
> Felipe, I use Dynamic Debug for debugging, and show debug messages with
> "dmesg" after testing/debugging. I see dwc3 using trace,  any benefits
> for switching
> to trace?

The benefits I see are

- *by default*, the debug log doesn't have to go through uart console,
  which is slow.

  I typically 'cat trace_pipe' from a telnet which is much faster then
  uart. But Dynamic Debug log by default got printed on uart, I have to
  set printk level to not print them, which is an extra step.

- tracepoint uses one place to decode the message vs DD has to repeat
  the similar print statement in the code; and tracepoint decodes it
  offline which reduce the kernel runtime overhead too.

- with tracepoint, it is easier to turn on debug for a specific group of
  messages.

- you can adjust the ftrace buffer size at runtime. can we do that for
  printk? I don't remember.

Regards,
-Bin.

Reply via email to