From: Andrew Gabbasov Date: Sun, 25 Nov 2012 21:13:16 +0000 (-0500) Subject: sock instrumentation: fix fields to get referenced values X-Git-Tag: v2.2.0-rc1~31 X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=commitdiff_plain;h=180f0df2773963488ed52b6db03f5bbab5c55807 sock instrumentation: fix fields to get referenced values 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 Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/sock.h b/instrumentation/events/lttng-module/sock.h index b0c74114..3e3dbc72 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))