----- Original Message ----- > From: "Frank Ch. Eigler" <[email protected]> > To: "Mathieu Desnoyers" <[email protected]> > Cc: "Steven Rostedt" <[email protected]>, [email protected], > "Ingo Molnar" <[email protected]>, "Frederic > Weisbecker" <[email protected]>, "Andrew Morton" > <[email protected]>, "Johannes Berg" > <[email protected]> > Sent: Thursday, March 13, 2014 12:35:31 PM > Subject: Re: [RFC PATCH v2] Tracepoint: register/unregister struct tracepoint > > Hi - > > On Thu, Mar 13, 2014 at 12:10:48PM -0400, Mathieu Desnoyers wrote: > > > [...] Moreover, tracers are responsible for unregistering the probe > > before the module containing its associated tracepoint is unloaded. > > Could you spell out please how a tracer is supposed to know early > enough that the module is going to be unloaded?
There are two ways this can be done. One use-case is when the probe and the callsite are within the same module, or if the module containing the probe has a symbol dependency on the callsite. In this case the probe normally unregisters itself from a module exit function before the module unloads. The other use-case is if the tracer has a module coming/going notifier tracking the module's tracepoint callsites. The going notifier should be run before the tracepoint.c going notifier. A notifier with negative priority should have this effect, since the tracepoint.c notifier has priority 0. Thoughts ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

