]> git.pld-linux.org Git - packages/lttng-modules.git/blame - sock-update.patch
- upstream fixes for kernel 4.15
[packages/lttng-modules.git] / sock-update.patch
CommitLineData
9fd83755
JR
1From f279893a432a5c5c5d4488f65a0719181a06da56 Mon Sep 17 00:00:00 2001
2From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3Date: Tue, 26 Dec 2017 09:47:36 -0500
4Subject: [PATCH] Update sock instrumentation for 4.15
5
6Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7---
8 instrumentation/events/lttng-module/sock.h | 22 ++++++++++++++++++++++
9 1 file changed, 22 insertions(+)
10
11diff --git a/instrumentation/events/lttng-module/sock.h b/instrumentation/events/lttng-module/sock.h
12index e79f8dc..5cd02ca 100644
13--- a/instrumentation/events/lttng-module/sock.h
14+++ b/instrumentation/events/lttng-module/sock.h
15@@ -5,6 +5,7 @@
16 #define LTTNG_TRACE_SOCK_H
17
18 #include <probes/lttng-tracepoint-event.h>
19+#include <linux/version.h>
20 #include <net/sock.h>
21
22 LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
23@@ -20,6 +21,25 @@ LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
24 )
25 )
26
27+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
28+
29+LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
30+
31+ TP_PROTO(struct sock *sk, struct proto *prot, long allocated),
32+
33+ TP_ARGS(sk, prot, allocated),
34+
35+ TP_FIELDS(
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))
41+ )
42+)
43+
44+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
45+
46 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
47
48 TP_PROTO(struct sock *sk, struct proto *prot, long allocated),
49@@ -35,6 +55,8 @@ LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
50 )
51 )
52
53+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
54+
55 #endif /* LTTNG_TRACE_SOCK_H */
56
57 /* This part must be outside protection */
This page took 0.042512 seconds and 4 git commands to generate.