lkml.org 
[lkml]   [2014]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2014-03-13 18:22    [W:0.068 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site