[Drbd-dev] DRBD-8: <FOR REVIEW> dynamic tracing facility

Philipp Reisner philipp.reisner at linbit.com
Tue Sep 26 18:23:54 CEST 2006


Am Sonntag, 24. September 2006 15:47 schrieb Graham, Simon:
> As we discussed a few weeks ago, I propose adding a more general purpose
> trace facility that can be controlled at run time - attached is a patch
> that implements the following:
>
> . New macros TRACE/MTRACE that can be used to add trace statements
> (using existing macros/routines) that
>   are controlled at run time.
> . Controls are module parameters:
>   . trace_type - bitmap of enabled types; currently defined are
> packet-dump, bio-dump, uuid-dump
>   . trace_level - the higher the level, the more detail
>   . trace_devs - bitmap of devices for which trace is enabled
> . I've converted the packet dumping code to use this
> . I've added two new types using it:
>   . bio-dump - this dumps info on bio's coming from above drbd. This is
> controlled by a new config
>     parameter DUMP_EACH_BIO that is off by default (although I think it
> could be on by default and
>     will be in our version).
>   . uuid-dump - dumps info on updates to uuid's, comparisons, etc
>
> I actually went back and forth on how much of this to implement inline
> versus via a routine call and it turned out to be pretty much the same
> amount of code at each trace site no matter what so I made it all
> inline.
>
> Comments?

Hi Simon,

I have two opinions about this:
 * Good stuff, it is nice to have all this in place, although I would 
   also like to disable the whole tracing/dumping at compile time.

 * On the other hand I am not sure if it could become obsolete by
   the current rumours about a DTrace replacement on Linux (SystemTrap)

So, over all, I will accept a patch:
 * That converts our current stuff over to such a tracing framework
 * Probably add event more tracing. (As you have done for UUIDs)
 * The tracing facility allowes to enable/disable different classes
   of tracing information at run-time.
 * But I would also like to disable it at completely at compile time.

-Phil
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :


More information about the drbd-dev mailing list