Update README.md for supported kernel
[lttng-modules.git] / instrumentation / events / lttng-module / sock.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: GPL-2.0-only */
b283666f
PW
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM sock
4
3bc29f0a
MD
5#if !defined(LTTNG_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ)
6#define LTTNG_TRACE_SOCK_H
b283666f 7
6ec43db8 8#include <probes/lttng-tracepoint-event.h>
b283666f 9#include <net/sock.h>
b283666f 10
3bc29f0a 11LTTNG_TRACEPOINT_EVENT(sock_rcvqueue_full,
b283666f
PW
12
13 TP_PROTO(struct sock *sk, struct sk_buff *skb),
14
15 TP_ARGS(sk, skb),
16
f127e61e
MD
17 TP_FIELDS(
18 ctf_integer(int, rmem_alloc, atomic_read(&sk->sk_rmem_alloc))
19 ctf_integer(unsigned int, truesize, skb->truesize)
20 ctf_integer(int, sk_rcvbuf, sk->sk_rcvbuf)
21 )
b283666f
PW
22)
23
53f9bf80
MJ
24LTTNG_TRACEPOINT_EVENT(sock_exceed_buf_limit,
25
26 TP_PROTO(struct sock *sk, struct proto *prot, long allocated, int kind),
27
28 TP_ARGS(sk, prot, allocated, kind),
29
30 TP_FIELDS(
31 ctf_string(name, prot->name)
32 ctf_array(long, sysctl_mem, prot->sysctl_mem, 3)
33 ctf_integer(long, allocated, allocated)
34 ctf_integer(int, sysctl_rmem, sk_get_rmem0(sk, prot))
35 ctf_integer(int, rmem_alloc, atomic_read(&sk->sk_rmem_alloc))
36 ctf_integer(int, sysctl_wmem, sk_get_wmem0(sk, prot))
37 ctf_integer(int, wmem_alloc, refcount_read(&sk->sk_wmem_alloc))
38 ctf_integer(int, wmem_queued, sk->sk_wmem_queued)
39 ctf_integer(int, kind, kind)
40 )
41)
42
3bc29f0a 43#endif /* LTTNG_TRACE_SOCK_H */
b283666f
PW
44
45/* This part must be outside protection */
6ec43db8 46#include <probes/define_trace.h>
This page took 0.037533 seconds and 4 git commands to generate.