Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled.

From: David Howells
Date: Thu Apr 07 2016 - 17:24:59 EST


David Miller <davem@xxxxxxxxxxxxx> wrote:

> As you can with the function tracer and tracepoints.

I've had experience with tracepoints before (i2c and smbus). It wasn't
particularly fun. There's got to be some easier way to write them.

Hmmm...

Of the _enter() and _leave() macros in my tree at the moment, I have 261 that
record more information than just the name of the function. I presume each
would need to be converted to a TRACE_EVENT*() macro as, as far as I can see
with a cursory examination, the function tracer doesn't record arguments or the
things arguments point to (which I do a lot of). There are also another 84 of
these macros that only record the name of the function which are simpler
propositions.

Add to that 286 _debug(), _net() and _proto() macros, all of which record more
information than just the name of the calling function and don't have anything
particularly to do with function trace.

Now, I have been considering that the _net() and _proto() macros would probably
work well as TRACE_EVENT()-type constructs, allowing the tracing of protocol
flow.

I don't suppose you have a script for automatically converting something like
a printk()-type thing into a TRACE_EVENT()?

David