[lttng-dev] [PATCH lttng-modules] sock instrumentation: fix fields to get referenced values
Andrew Gabbasov
andrew_gabbasov at mentor.com
Sun Nov 25 14:41:42 EST 2012
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>
---
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
More information about the lttng-dev
mailing list