]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> |
2 | Subject: Tracepoints : documentation fix teardown | |
3 | ||
4 | Need a tracepoint_synchronize_unregister() before the end of exit() to make sure | |
5 | every probe callers have exited the non preemptible section and thus are not | |
6 | executing the probe code anymore. | |
7 | ||
8 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | |
9 | CC: Rusty Russell <rusty@rustcorp.com.au> | |
10 | CC: "Frank Ch. Eigler" <fche@redhat.com> | |
11 | CC: Ingo Molnar <mingo@elte.hu> | |
12 | CC: Peter Zijlstra <peterz@infradead.org> | |
13 | CC: Steven Rostedt <rostedt@goodmis.org> | |
14 | Acked-by: Jan Blunck <jblunck@suse.de> | |
15 | --- | |
16 | Documentation/tracepoints.txt | 10 ++++++---- | |
17 | 1 file changed, 6 insertions(+), 4 deletions(-) | |
18 | ||
19 | Index: linux-2.6-lttng/Documentation/tracepoints.txt | |
20 | =================================================================== | |
21 | --- linux-2.6-lttng.orig/Documentation/tracepoints.txt 2008-07-31 09:22:56.000000000 -0400 | |
22 | +++ linux-2.6-lttng/Documentation/tracepoints.txt 2008-07-31 09:24:54.000000000 -0400 | |
23 | @@ -68,10 +68,12 @@ Where : | |
24 | Connecting a function (probe) to a tracepoint is done by providing a probe | |
25 | (function to call) for the specific tracepoint through | |
26 | register_trace_subsys_eventname(). Removing a probe is done through | |
27 | -unregister_trace_subsys_eventname(); it will remove the probe sure there is no | |
28 | -caller left using the probe when it returns. Probe removal is preempt-safe | |
29 | -because preemption is disabled around the probe call. See the "Probe example" | |
30 | -section below for a sample probe module. | |
31 | +unregister_trace_subsys_eventname(); it will remove the probe. | |
32 | +marker_synchronize_unregister() must be called before the end of the module exit | |
33 | +function to make sure there is no caller left using the probe. This, and the | |
34 | +fact that preemption is disabled around the probe call, make sure that probe | |
35 | +removal and module unload are safe. See the "Probe example" section below for a | |
36 | +sample probe module. | |
37 | ||
38 | The tracepoint mechanism supports inserting multiple instances of the same | |
39 | tracepoint, but a single definition must be made of a given tracepoint name over |