[lttng-dev] [PATCH lttng-modules] sock instrumentation: fix fields to get referenced values
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Sun Nov 25 16:14:54 EST 2012
* Andrew Gabbasov (andrew_gabbasov at mentor.com) wrote:
> Due to specific of passing values in lttng-modules, if it is supposed
> to display the values, passing a pointer will not be enough,
> we need to store the actual values.
>
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov at mentor.com>
Merged, thanks!
Mathieu
> ---
> instrumentation/events/lttng-module/sock.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/instrumentation/events/lttng-module/sock.h b/instrumentation/events/lttng-module/sock.h
> index b0c7411..3e3dbc7 100644
> --- a/instrumentation/events/lttng-module/sock.h
> +++ b/instrumentation/events/lttng-module/sock.h
> @@ -37,7 +37,7 @@ TRACE_EVENT(sock_exceed_buf_limit,
>
> TP_STRUCT__entry(
> __string(name, prot->name)
> - __field(long *, sysctl_mem)
> + __array(long, sysctl_mem, 3)
> __field(long, allocated)
> __field(int, sysctl_rmem)
> __field(int, rmem_alloc)
> @@ -45,7 +45,7 @@ TRACE_EVENT(sock_exceed_buf_limit,
>
> TP_fast_assign(
> tp_strcpy(name, prot->name)
> - tp_assign(sysctl_mem, prot->sysctl_mem)
> + tp_memcpy(sysctl_mem, prot->sysctl_mem, 3 * sizeof(long))
> tp_assign(allocated, allocated)
> tp_assign(sysctl_rmem, prot->sysctl_rmem[0])
> tp_assign(rmem_alloc, atomic_read(&sk->sk_rmem_alloc))
> --
> 1.7.10.4
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list