sock instrumentation: fix fields to get referenced values
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>
Sun, 25 Nov 2012 21:13:16 +0000 (16:13 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 25 Nov 2012 21:13:16 +0000 (16:13 -0500)
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@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/sock.h

index b0c7411470404c3fa798c29cb555e224c7062422..3e3dbc72e804b3e910da8af3850e0c67a326543a 100644 (file)
@@ -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))
This page took 0.031166 seconds and 5 git commands to generate.