Messages in this thread | | | Date | Thu, 28 Mar 2019 08:30:36 -0400 | From | Steven Rostedt <> | Subject | Re: [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 <gregkh@linuxfoundation.org> 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 filtering.
See Documentation/trace/events.rst Section 5: Event Filtering
-- Steve
| |