[ltt-dev] [PATCH] Add pipe probe to lttng module

Francis Giraldeau francis.giraldeau at gmail.com
Thu May 19 16:38:27 EDT 2011


From: Francis Giraldeau <francis.giraldeau at usherbrooke.ca>

This patch provides instrumentation for pipe system call. It records the fd
read and write ends of the pipe if the operation succeeed. This is required to
recover from the trace the full list of file descriptor of a process.

Signed-off-by: Francis Giraldeau <francis.giraldeau at gmail.com>
---
 probes/fs-trace.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/probes/fs-trace.c b/probes/fs-trace.c
index 4635c88..7de28aa 100644
--- a/probes/fs-trace.c
+++ b/probes/fs-trace.c
@@ -159,6 +159,12 @@ void probe_fs_dup(void *_data, unsigned int oldfd, unsigned int newfd)
 		"oldfd %d newfd %d", oldfd, newfd);
 }
 
+void probe_fs_pipe(void *_data, int readfd, int writefd)
+{
+	trace_mark_tp(fs, pipe, fs_pipe, probe_fs_pipe,
+		"readfd %d writefd %d", readfd, writefd);
+}
+
 MODULE_LICENSE("GPL and additional rights");
 MODULE_AUTHOR("Mathieu Desnoyers");
 MODULE_DESCRIPTION("FS Tracepoint Probes");
-- 
1.7.1





More information about the lttng-dev mailing list