From: Francis Giraldeau <[email protected]>

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 <[email protected]>
---
 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


_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Reply via email to