fix: ext4: indicate via a block bitmap read is prefetched… (v5.9)
[lttng-modules.git] / instrumentation / events / lttng-module / random.h
CommitLineData
9f36eaed 1/* SPDX-License-Identifier: GPL-2.0 */
b87700e3
AG
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM random
4
3bc29f0a
MD
5#if !defined(LTTNG_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ)
6#define LTTNG_TRACE_RANDOM_H
b87700e3 7
6ec43db8 8#include <probes/lttng-tracepoint-event.h>
b87700e3 9#include <linux/writeback.h>
b87700e3 10
3bc29f0a 11LTTNG_TRACEPOINT_EVENT_CLASS(random__mix_pool_bytes,
b87700e3
AG
12 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
13
14 TP_ARGS(pool_name, bytes, IP),
15
f127e61e
MD
16 TP_FIELDS(
17 ctf_string(pool_name, pool_name)
18 ctf_integer(int, bytes, bytes)
19 ctf_integer(unsigned long, IP, IP)
20 )
b87700e3
AG
21)
22
3bc29f0a 23LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__mix_pool_bytes, mix_pool_bytes,
9cf29d3e
MD
24
25 random_mix_pool_bytes,
26
b87700e3
AG
27 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
28
29 TP_ARGS(pool_name, bytes, IP)
30)
31
3bc29f0a 32LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__mix_pool_bytes, mix_pool_bytes_nolock,
9cf29d3e
MD
33
34 random_mix_pool_bytes_nolock,
35
b87700e3
AG
36 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
37
38 TP_ARGS(pool_name, bytes, IP)
39)
40
a6a26911
MJ
41#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0))
42LTTNG_TRACEPOINT_EVENT_MAP(credit_entropy_bits,
43
44 random_credit_entropy_bits,
45
46 TP_PROTO(const char *pool_name, int bits, int entropy_count,
47 unsigned long IP),
48
49 TP_ARGS(pool_name, bits, entropy_count, IP),
50
51 TP_FIELDS(
52 ctf_string(pool_name, pool_name)
53 ctf_integer(int, bits, bits)
54 ctf_integer(int, entropy_count, entropy_count)
55 ctf_integer(unsigned long, IP, IP)
56 )
57)
58#else
3bc29f0a 59LTTNG_TRACEPOINT_EVENT_MAP(credit_entropy_bits,
9cf29d3e
MD
60
61 random_credit_entropy_bits,
62
b87700e3
AG
63 TP_PROTO(const char *pool_name, int bits, int entropy_count,
64 int entropy_total, unsigned long IP),
65
66 TP_ARGS(pool_name, bits, entropy_count, entropy_total, IP),
67
f127e61e
MD
68 TP_FIELDS(
69 ctf_string(pool_name, pool_name)
70 ctf_integer(int, bits, bits)
71 ctf_integer(int, entropy_count, entropy_count)
72 ctf_integer(int, entropy_total, entropy_total)
73 ctf_integer(unsigned long, IP, IP)
74 )
b87700e3 75)
a6a26911 76#endif
b87700e3 77
3bc29f0a 78LTTNG_TRACEPOINT_EVENT_MAP(get_random_bytes,
9cf29d3e
MD
79
80 random_get_random_bytes,
81
b87700e3
AG
82 TP_PROTO(int nbytes, unsigned long IP),
83
84 TP_ARGS(nbytes, IP),
85
f127e61e
MD
86 TP_FIELDS(
87 ctf_integer(int, nbytes, nbytes)
88 ctf_integer(unsigned long, IP, IP)
89 )
b87700e3
AG
90)
91
3bc29f0a 92LTTNG_TRACEPOINT_EVENT_CLASS(random__extract_entropy,
b87700e3
AG
93 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
94 unsigned long IP),
95
96 TP_ARGS(pool_name, nbytes, entropy_count, IP),
97
f127e61e
MD
98 TP_FIELDS(
99 ctf_string(pool_name, pool_name)
100 ctf_integer(int, nbytes, nbytes)
101 ctf_integer(int, entropy_count, entropy_count)
102 ctf_integer(unsigned long, IP, IP)
103 )
b87700e3
AG
104)
105
106
3bc29f0a 107LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__extract_entropy, extract_entropy,
9cf29d3e
MD
108
109 random_extract_entropy,
110
b87700e3
AG
111 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
112 unsigned long IP),
113
114 TP_ARGS(pool_name, nbytes, entropy_count, IP)
115)
116
3bc29f0a 117LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__extract_entropy, extract_entropy_user,
9cf29d3e
MD
118
119 random_extract_entropy_user,
120
b87700e3
AG
121 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
122 unsigned long IP),
123
124 TP_ARGS(pool_name, nbytes, entropy_count, IP)
125)
126
127
128
3bc29f0a 129#endif /* LTTNG_TRACE_RANDOM_H */
b87700e3
AG
130
131/* This part must be outside protection */
6ec43db8 132#include <probes/define_trace.h>
This page took 0.05027 seconds and 4 git commands to generate.