Linux 4.8.3
[linux/fpc-iii.git] / include / trace / events / sock.h
blob779abb91df81032e28e0249b0d1947d35ac7d492
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM sock
4 #if !defined(_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_SOCK_H
7 #include <net/sock.h>
8 #include <linux/tracepoint.h>
10 TRACE_EVENT(sock_rcvqueue_full,
12 TP_PROTO(struct sock *sk, struct sk_buff *skb),
14 TP_ARGS(sk, skb),
16 TP_STRUCT__entry(
17 __field(int, rmem_alloc)
18 __field(unsigned int, truesize)
19 __field(int, sk_rcvbuf)
22 TP_fast_assign(
23 __entry->rmem_alloc = atomic_read(&sk->sk_rmem_alloc);
24 __entry->truesize = skb->truesize;
25 __entry->sk_rcvbuf = sk->sk_rcvbuf;
28 TP_printk("rmem_alloc=%d truesize=%u sk_rcvbuf=%d",
29 __entry->rmem_alloc, __entry->truesize, __entry->sk_rcvbuf)
32 TRACE_EVENT(sock_exceed_buf_limit,
34 TP_PROTO(struct sock *sk, struct proto *prot, long allocated),
36 TP_ARGS(sk, prot, allocated),
38 TP_STRUCT__entry(
39 __array(char, name, 32)
40 __field(long *, sysctl_mem)
41 __field(long, allocated)
42 __field(int, sysctl_rmem)
43 __field(int, rmem_alloc)
46 TP_fast_assign(
47 strncpy(__entry->name, prot->name, 32);
48 __entry->sysctl_mem = prot->sysctl_mem;
49 __entry->allocated = allocated;
50 __entry->sysctl_rmem = prot->sysctl_rmem[0];
51 __entry->rmem_alloc = atomic_read(&sk->sk_rmem_alloc);
54 TP_printk("proto:%s sysctl_mem=%ld,%ld,%ld allocated=%ld "
55 "sysctl_rmem=%d rmem_alloc=%d",
56 __entry->name,
57 __entry->sysctl_mem[0],
58 __entry->sysctl_mem[1],
59 __entry->sysctl_mem[2],
60 __entry->allocated,
61 __entry->sysctl_rmem,
62 __entry->rmem_alloc)
65 #endif /* _TRACE_SOCK_H */
67 /* This part must be outside protection */
68 #include <trace/define_trace.h>