]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/trace/events/sock.h
1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM sock
5 #if !defined(_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ)
9 #include <linux/tracepoint.h>
11 TRACE_EVENT(sock_rcvqueue_full
,
13 TP_PROTO(struct sock
*sk
, struct sk_buff
*skb
),
18 __field(int, rmem_alloc
)
19 __field(unsigned int, truesize
)
20 __field(int, sk_rcvbuf
)
24 __entry
->rmem_alloc
= atomic_read(&sk
->sk_rmem_alloc
);
25 __entry
->truesize
= skb
->truesize
;
26 __entry
->sk_rcvbuf
= sk
->sk_rcvbuf
;
29 TP_printk("rmem_alloc=%d truesize=%u sk_rcvbuf=%d",
30 __entry
->rmem_alloc
, __entry
->truesize
, __entry
->sk_rcvbuf
)
33 TRACE_EVENT(sock_exceed_buf_limit
,
35 TP_PROTO(struct sock
*sk
, struct proto
*prot
, long allocated
),
37 TP_ARGS(sk
, prot
, allocated
),
40 __array(char, name
, 32)
41 __field(long *, sysctl_mem
)
42 __field(long, allocated
)
43 __field(int, sysctl_rmem
)
44 __field(int, rmem_alloc
)
48 strncpy(__entry
->name
, prot
->name
, 32);
49 __entry
->sysctl_mem
= prot
->sysctl_mem
;
50 __entry
->allocated
= allocated
;
51 __entry
->sysctl_rmem
= sk_get_rmem0(sk
, prot
);
52 __entry
->rmem_alloc
= atomic_read(&sk
->sk_rmem_alloc
);
55 TP_printk("proto:%s sysctl_mem=%ld,%ld,%ld allocated=%ld "
56 "sysctl_rmem=%d rmem_alloc=%d",
58 __entry
->sysctl_mem
[0],
59 __entry
->sysctl_mem
[1],
60 __entry
->sysctl_mem
[2],
66 #endif /* _TRACE_SOCK_H */
68 /* This part must be outside protection */
69 #include <trace/define_trace.h>