1 From f279893a432a5c5c5d4488f65a0719181a06da56 Mon Sep 17 00:00:00 2001
2 From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 Date: Tue, 26 Dec 2017 09:47:36 -0500
4 Subject: [PATCH] Update sock instrumentation for 4.15
6 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 instrumentation/events/lttng-module/sock.h | 22 ++++++++++++++++++++++
9 1 file changed, 22 insertions(+)
11 diff --git a/instrumentation/events/lttng-module/sock.h b/instrumentation/events/lttng-module/sock.h
12 index e79f8dc..5cd02ca 100644
13 --- a/instrumentation/events/lttng-module/sock.h
14 +++ b/instrumentation/events/lttng-module/sock.h
16 #define LTTNG_TRACE_SOCK_H
18 #include <probes/lttng-tracepoint-event.h>
19 +#include <linux/version.h>
22 LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
23 @@ -20,6 +21,25 @@ LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
27 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
29 +LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
31 + TP_PROTO(struct sock *sk, struct proto *prot, long allocated),
33 + TP_ARGS(sk, prot, allocated),
36 + ctf_string(name, prot->name)
37 + ctf_array(long, sysctl_mem, prot->sysctl_mem, 3)
38 + ctf_integer(long, allocated, allocated)
39 + ctf_integer(int, sysctl_rmem, sk_get_rmem0(sk, prot))
40 + ctf_integer(int, rmem_alloc, atomic_read(&sk->sk_rmem_alloc))
44 +#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
46 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
48 TP_PROTO(struct sock *sk, struct proto *prot, long allocated),
49 @@ -35,6 +55,8 @@ LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
53 +#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
55 #endif /* LTTNG_TRACE_SOCK_H */
57 /* This part must be outside protection */