[lkml]   [2019]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 3/4] driver core: add dev_print_hex_dump() logging function.
On Thu, 28 Mar 2019 12:29:52 +0100
Greg Kroah-Hartman <> wrote:

> > 3. In at least two places we log different types of packets in the
> > same lines of code (protected by a "if (log_mask & PKT_TYPE)") -
> > dynamic-debug would only allow enabling or disabling logging of
> > all packets. This could be worked around by creating a separate
> > (but essentially duplicate) logging function for each packet type
> > and some lookup table to call the appropriate one. Not very
> > pretty IMO, though.
> True, but you can use tracepoints as well, that would probably be much
> easier when you are logging data streams. You can also use an ebpf
> program with the tracepoints to log just what you need/want to when you
> want to as well.

And tracepoints have filters where you don't even need ebpf to do such

See Documentation/trace/events.rst Section 5: Event Filtering

-- Steve

 \ /
  Last update: 2019-03-28 13:31    [W:0.074 / U:34.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site