1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM sock
5 #if !defined(LTTNG_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_SOCK_H
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/version.h>
12 LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full
,
14 TP_PROTO(struct sock
*sk
, struct sk_buff
*skb
),
19 ctf_integer(int, rmem_alloc
, atomic_read(&sk
->sk_rmem_alloc
))
20 ctf_integer(unsigned int, truesize
, skb
->truesize
)
21 ctf_integer(int, sk_rcvbuf
, sk
->sk_rcvbuf
)
25 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0))
27 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit
,
29 TP_PROTO(struct sock
*sk
, struct proto
*prot
, long allocated
, int kind
),
31 TP_ARGS(sk
, prot
, allocated
, kind
),
34 ctf_string(name
, prot
->name
)
35 ctf_array(long, sysctl_mem
, prot
->sysctl_mem
, 3)
36 ctf_integer(long, allocated
, allocated
)
37 ctf_integer(int, sysctl_rmem
, sk_get_rmem0(sk
, prot
))
38 ctf_integer(int, rmem_alloc
, atomic_read(&sk
->sk_rmem_alloc
))
39 ctf_integer(int, sysctl_wmem
, sk_get_wmem0(sk
, prot
))
40 ctf_integer(int, wmem_alloc
, refcount_read(&sk
->sk_wmem_alloc
))
41 ctf_integer(int, wmem_queued
, sk
->sk_wmem_queued
)
42 ctf_integer(int, kind
, kind
)
46 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
48 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit
,
50 TP_PROTO(struct sock
*sk
, struct proto
*prot
, long allocated
),
52 TP_ARGS(sk
, prot
, allocated
),
55 ctf_string(name
, prot
->name
)
56 ctf_array(long, sysctl_mem
, prot
->sysctl_mem
, 3)
57 ctf_integer(long, allocated
, allocated
)
58 ctf_integer(int, sysctl_rmem
, sk_get_rmem0(sk
, prot
))
59 ctf_integer(int, rmem_alloc
, atomic_read(&sk
->sk_rmem_alloc
))
63 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
65 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit
,
67 TP_PROTO(struct sock
*sk
, struct proto
*prot
, long allocated
),
69 TP_ARGS(sk
, prot
, allocated
),
72 ctf_string(name
, prot
->name
)
73 ctf_array(long, sysctl_mem
, prot
->sysctl_mem
, 3)
74 ctf_integer(long, allocated
, allocated
)
75 ctf_integer(int, sysctl_rmem
, prot
->sysctl_rmem
[0])
76 ctf_integer(int, rmem_alloc
, atomic_read(&sk
->sk_rmem_alloc
))
80 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */
82 #endif /* LTTNG_TRACE_SOCK_H */
84 /* This part must be outside protection */
85 #include <probes/define_trace.h>
This page took 0.030931 seconds and 4 git commands to generate.