[RFC 1/3] Linux Kernel Markers - Support Multiple Probes

Previous thread: [RFC 0/3] Linux Kernel Markers new features by Mathieu Desnoyers on Tuesday, November 13, 2007 - 12:03 pm. (1 message)

Next thread: [RFC 2/3] Linux Kernel Markers - Create modpost file by Mathieu Desnoyers on Tuesday, November 13, 2007 - 12:03 pm. (1 message)
From: Mathieu Desnoyers
Date: Tuesday, November 13, 2007 - 12:03 pm

RCU style multiple probes support for the Linux Kernel Markers.
Common case (one probe) is still fast and does not require dynamic allocation
or a supplementary pointer dereference on the fast path.

- Move preempt disable from the marker site to the callback.

Since we now have an internal callback, move the preempt disable/enable to the
callback instead of the marker site.

Since the callback change is done asynchronously (passing from a handler that
supports arguments to a handler that does not setup the arguments is no
arguments are passed), we can safely update it even if it is outside the preempt
disable section.

- Move probe arm to probe connection. Now, a connected probe is automatically
  armed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
 include/linux/marker.h          |   51 +--
 include/linux/module.h          |    2 
 kernel/marker.c                 |  663 +++++++++++++++++++++++++++++-----------
 kernel/module.c                 |    7 
 samples/markers/probe-example.c |   33 +
 5 files changed, 546 insertions(+), 210 deletions(-)

Index: linux-2.6-lttng/include/linux/marker.h
===================================================================
--- linux-2.6-lttng.orig/include/linux/marker.h	2007-11-13 09:48:35.000000000 -0500
+++ linux-2.6-lttng/include/linux/marker.h	2007-11-13 09:48:41.000000000 -0500
@@ -19,16 +19,23 @@ struct marker;
 
 /**
  * marker_probe_func - Type of a marker probe function
- * @mdata: pointer of type struct marker
- * @private_data: caller site private data
+ * @probe_data: probe private data
+ * @private_data: call site private data
  * @fmt: format string
- * @...: variable argument list
+ * @args: variable argument list pointer. Use a pointer to overcome C's
+ *        inability to pass this around as a pointer in a portable manner in
+ *        the callee otherwise.
  *
  * Type of marker probe functions. They receive the mdata and need to parse the
  * format string to recover the variable ...
Previous thread: [RFC 0/3] Linux Kernel Markers new features by Mathieu Desnoyers on Tuesday, November 13, 2007 - 12:03 pm. (1 message)

Next thread: [RFC 2/3] Linux Kernel Markers - Create modpost file by Mathieu Desnoyers on Tuesday, November 13, 2007 - 12:03 pm. (1 message)