Messages in this thread | | | Date | Thu, 13 Mar 2014 16:54:16 +0000 (UTC) | From | Mathieu Desnoyers <> | Subject | Re: [RFC PATCH v2] Tracepoint: register/unregister struct tracepoint |
| |
----- Original Message ----- > From: "Frank Ch. Eigler" <fche@redhat.com> > To: "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com> > Cc: "Steven Rostedt" <rostedt@goodmis.org>, linux-kernel@vger.kernel.org, "Ingo Molnar" <mingo@kernel.org>, "Frederic > Weisbecker" <fweisbec@gmail.com>, "Andrew Morton" <akpm@linux-foundation.org>, "Johannes Berg" > <johannes.berg@intel.com> > 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
| |