Fix: scsi: sd: Atomic write support added in 6.11-rc1
[lttng-modules.git] / include / instrumentation / events / sock.h
1 // SPDX-FileCopyrightText: 2012 Paul Woegerer <paul_woegerer@mentor.com>
2 //
3 // SPDX-License-Identifier: GPL-2.0-only
4
5 #undef TRACE_SYSTEM
6 #define TRACE_SYSTEM sock
7
8 #if !defined(LTTNG_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define LTTNG_TRACE_SOCK_H
10
11 #include <lttng/tracepoint-event.h>
12 #include <lttng/kernel-version.h>
13 #include <net/sock.h>
14
15 LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
16
17 TP_PROTO(struct sock *sk, struct sk_buff *skb),
18
19 TP_ARGS(sk, skb),
20
21 TP_FIELDS(
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)
25 )
26 )
27
28 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,19,0))
29
30 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
31
32 TP_PROTO(struct sock *sk, struct proto *prot, long allocated, int kind),
33
34 TP_ARGS(sk, prot, allocated, kind),
35
36 TP_FIELDS(
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)
46 )
47 )
48
49 #elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0))
50
51 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
52
53 TP_PROTO(struct sock *sk, struct proto *prot, long allocated),
54
55 TP_ARGS(sk, prot, allocated),
56
57 TP_FIELDS(
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))
63 )
64 )
65
66 #else /* #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
67
68 LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
69
70 TP_PROTO(struct sock *sk, struct proto *prot, long allocated),
71
72 TP_ARGS(sk, prot, allocated),
73
74 TP_FIELDS(
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))
80 )
81 )
82
83 #endif /* #else #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,15,0)) */
84
85 #endif /* LTTNG_TRACE_SOCK_H */
86
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.