[ltt-dev] [PATCH] Add dup probe to lttng module
Mathieu Desnoyers
compudj at krystal.dyndns.org
Wed May 18 17:59:06 EDT 2011
merged, thanks!
Mathieu
* Francis Giraldeau (francis.giraldeau at usherbrooke.ca) wrote:
> 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 at usherbrooke.ca>
> ---
> 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
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list