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 <[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 ccfc282..4635c88 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"); -- 1.7.1 _______________________________________________ ltt-dev mailing list [email protected] http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
