Skip to contentSkip to conversation

Tracepoints synchronize unregister static inline

PATCH In review Mathieu Desnoyers 2 participants 4 messages Oct 3, 2008 – Oct 10, 2008 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Tracepoints synchronize unregister static inline

Ingo, could you pull the following patch into -tip ?

Thanks,

Mathieu

Turn tracepoint synchronize unregister into a static inline. There is no reason to keep it as a macro over a static inline.

CC Ingo Molnar <[email protected]>
CC Andrew Morton <[email protected]>
---
 include/linux/tracepoint.h |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/linux/tracepoint.h +4 -1
Index: linux-2.6-lttng/include/linux/tracepoint.h
===================================================================
@@ -153,6 +153,9 @@ extern int tracepoint_get_iter_range(str
  * probe unregistration and the end of module exit to make sure there is no
  * caller executing a probe when it is freed.
  */
-#define tracepoint_synchronize_unregister() synchronize_sched()
+static inline void tracepoint_synchronize_unregister(void)
+{
+	synchronize_sched();
+}
 
 #endif
Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#1 lore raw
Quoted 1 line · Mathieu Desnoyers

Ingo, could you pull the following patch into -tip ?

sure - but it does not apply to tip/master. Some missing dependencies?

Ingo

#2 lore raw
Quoted 8 lines · * Ingo Molnar ([email protected]) wrote:
Quoted 1 line · Mathieu Desnoyers

Ingo, could you pull the following patch into -tip ?

sure - but it does not apply to tip/master. Some missing dependencies?

Ingo

Hi Ingo,

"Tracepoints synchronize unregister static inline" applies on top of
"Tracepoints : tracepoint_synchronize_unregister()"

I posted earlier but does not seem to be in tip/master. Here is a repost :

Tracepoints : tracepoint_synchronize_unregister()

Create tracepoint_synchronize_unregister() which must be called before the end of exit() to make sure every probe callers have exited the non preemptible section and thus are not executing the probe code anymore.

CC Rusty Russell <[email protected]>
CC "Frank Ch. Eigler" <[email protected]>
CC Ingo Molnar <[email protected]>
CC Peter Zijlstra <[email protected]>
CC Steven Rostedt <[email protected]>
---
 include/linux/tracepoint.h |    7 +++++++
 1 file changed, 7 insertions(+)
include/linux/tracepoint.h +7 -0
Index: linux-2.6-lttng/include/linux/tracepoint.h
===================================================================
@@ -124,4 +124,11 @@ extern void tracepoint_iter_reset(struct
 extern int tracepoint_get_iter_range(struct tracepoint **tracepoint,
 	struct tracepoint *begin, struct tracepoint *end);
 
+/*
+ * tracepoint_synchronize_unregister must be called between the last tracepoint
+ * probe unregistration and the end of module exit to make sure there is no
+ * caller executing a probe when it is freed.
+ */
+#define tracepoint_synchronize_unregister() synchronize_sched()
+
 #endif
Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#3 lore raw
Quoted 12 lines · Mathieu Desnoyers
Quoted 8 lines · * Ingo Molnar ([email protected]) wrote:
Quoted 1 line · Mathieu Desnoyers

Ingo, could you pull the following patch into -tip ?

sure - but it does not apply to tip/master. Some missing dependencies?

Ingo

Hi Ingo,

Quoted 8 lines

"Tracepoints synchronize unregister static inline" applies on top of
"Tracepoints : tracepoint_synchronize_unregister()"

I posted earlier but does not seem to be in tip/master. Here is a repost :

Tracepoints : tracepoint_synchronize_unregister()

picked them up into tip/tracing/tracepoints:

1c38db9: tracepoints: synchronize unregister static inline 99067e3: tracepoints: tracepoint_synchronize_unregister()

thanks Mathieu!

Ingo