]> git.lttng.org Git - lttng-modules.git/commitdiff
Add dup probe to lttng module
authorFrancis Giraldeau <francis.giraldeau@usherbrooke.ca>
Wed, 18 May 2011 20:25:15 +0000 (16:25 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 18 May 2011 20:25:15 +0000 (16:25 -0400)
This patch provides instrumentation for dup system call. It records the
oldfd and newfd if the operation succeed. This is required to recover in
the trace tre fd that newfd reference to.

Signed-off-by: Francis Giraldeau <francis.giraldeau@usherbrooke.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/fs-trace.c

index ccfc28203d72fb21db6a8f5da42e445006315e00..4635c881f547bef791947d490edc3f778d7ba79d 100644 (file)
@@ -153,6 +153,12 @@ void probe_fs_poll(void *_data, int fd)
                "fd %d", fd);
 }
 
+void probe_fs_dup(void *_data, unsigned int oldfd, unsigned int newfd)
+{
+       trace_mark_tp(fs, dup, fs_dup, probe_fs_dup,
+               "oldfd %d newfd %d", oldfd, newfd);
+}
+
 MODULE_LICENSE("GPL and additional rights");
 MODULE_AUTHOR("Mathieu Desnoyers");
 MODULE_DESCRIPTION("FS Tracepoint Probes");
This page took 0.030951 seconds and 4 git commands to generate.