From: Francis Giraldeau Date: Wed, 18 May 2011 20:25:15 +0000 (-0400) Subject: Add dup probe to lttng module X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=ac04388fc5abb5239519a4588359b36860c73080;p=lttng-modules.git Add dup probe to lttng module 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 Signed-off-by: Mathieu Desnoyers --- diff --git a/probes/fs-trace.c b/probes/fs-trace.c index ccfc2820..4635c881 100644 --- a/probes/fs-trace.c +++ b/probes/fs-trace.c @@ -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");