1 // SPDX-FileCopyrightText: 2012 Paul Woegerer <paul_woegerer@mentor.com>
3 // SPDX-License-Identifier: GPL-2.0-only
6 #define TRACE_SYSTEM sock
8 #if !defined(LTTNG_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define LTTNG_TRACE_SOCK_H
11 #include <lttng/tracepoint-event.h>
12 #include <lttng/kernel-version.h>
15 LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full
,
17 TP_PROTO(struct sock
*sk
, struct sk_buff
*skb
),
22 ctf_integer(int, rmem_alloc
, atomic_read(&sk
->sk_rmem_alloc
))
23 ctf_integer(unsigned int, truesize
, skb
->truesize
)
24 ctf_integer(int, sk_rcvbuf
, sk
->sk_rcvbuf
)
28 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0))
30 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit
,
32 TP_PROTO(struct sock
*sk
, struct proto
*prot
, long allocated
, int kind
),
34 TP_ARGS(sk
, prot
, allocated
, kind
),
37 ctf_string(name
, prot
->name
)
38 ctf_array(long, sysctl_mem
, prot
->sysctl_mem
, 3)
39 ctf_integer(long, allocated
, allocated
)
40 ctf_integer(int, sysctl_rmem
, sk_get_rmem0(sk
, prot
))
41 ctf_integer(int, rmem_alloc
, atomic_read(&sk
->sk_rmem_alloc
))
42 ctf_integer(int, sysctl_wmem
, sk_get_wmem0(sk
, prot
))
43 ctf_integer(int, wmem_alloc
, refcount_read(&sk
->sk_wmem_alloc
))
44 ctf_integer(int, wmem_queued
, sk
->sk_wmem_queued
)
45 ctf_integer(int, kind
, kind
)
49 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
51 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit
,
53 TP_PROTO(struct sock
*sk
, struct proto
*prot
, long allocated
),
55 TP_ARGS(sk
, prot
, allocated
),
58 ctf_string(name
, prot
->name
)
59 ctf_array(long, sysctl_mem
, prot
->sysctl_mem
, 3)
60 ctf_integer(long, allocated
, allocated
)
61 ctf_integer(int, sysctl_rmem
, sk_get_rmem0(sk
, prot
))
62 ctf_integer(int, rmem_alloc
, atomic_read(&sk
->sk_rmem_alloc
))
66 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
68 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit
,
70 TP_PROTO(struct sock
*sk
, struct proto
*prot
, long allocated
),
72 TP_ARGS(sk
, prot
, allocated
),
75 ctf_string(name
, prot
->name
)
76 ctf_array(long, sysctl_mem
, prot
->sysctl_mem
, 3)
77 ctf_integer(long, allocated
, allocated
)
78 ctf_integer(int, sysctl_rmem
, prot
->sysctl_rmem
[0])
79 ctf_integer(int, rmem_alloc
, atomic_read(&sk
->sk_rmem_alloc
))
83 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
85 #endif /* LTTNG_TRACE_SOCK_H */
87 /* This part must be outside protection */
88 #include <lttng/define_trace.h>
This page took 0.03301 seconds and 5 git commands to generate.