Commit | Line | Data |
---|---|---|
b7cdc182 | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
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 | 11 | LTTNG_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) | |
2c054599 | 19 | ctf_integer_hex(unsigned long, IP, IP) |
f127e61e | 20 | ) |
b87700e3 AG |
21 | ) |
22 | ||
3bc29f0a | 23 | LTTNG_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 | 32 | LTTNG_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 | LTTNG_TRACEPOINT_EVENT_MAP(credit_entropy_bits, |
42 | ||
43 | random_credit_entropy_bits, | |
44 | ||
45 | TP_PROTO(const char *pool_name, int bits, int entropy_count, | |
46 | unsigned long IP), | |
47 | ||
48 | TP_ARGS(pool_name, bits, entropy_count, IP), | |
49 | ||
50 | TP_FIELDS( | |
51 | ctf_string(pool_name, pool_name) | |
52 | ctf_integer(int, bits, bits) | |
53 | ctf_integer(int, entropy_count, entropy_count) | |
2c054599 | 54 | ctf_integer_hex(unsigned long, IP, IP) |
a6a26911 MJ |
55 | ) |
56 | ) | |
b87700e3 | 57 | |
3bc29f0a | 58 | LTTNG_TRACEPOINT_EVENT_MAP(get_random_bytes, |
9cf29d3e MD |
59 | |
60 | random_get_random_bytes, | |
61 | ||
b87700e3 AG |
62 | TP_PROTO(int nbytes, unsigned long IP), |
63 | ||
64 | TP_ARGS(nbytes, IP), | |
65 | ||
f127e61e MD |
66 | TP_FIELDS( |
67 | ctf_integer(int, nbytes, nbytes) | |
2c054599 | 68 | ctf_integer_hex(unsigned long, IP, IP) |
f127e61e | 69 | ) |
b87700e3 AG |
70 | ) |
71 | ||
3bc29f0a | 72 | LTTNG_TRACEPOINT_EVENT_CLASS(random__extract_entropy, |
b87700e3 AG |
73 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, |
74 | unsigned long IP), | |
75 | ||
76 | TP_ARGS(pool_name, nbytes, entropy_count, IP), | |
77 | ||
f127e61e MD |
78 | TP_FIELDS( |
79 | ctf_string(pool_name, pool_name) | |
80 | ctf_integer(int, nbytes, nbytes) | |
81 | ctf_integer(int, entropy_count, entropy_count) | |
2c054599 | 82 | ctf_integer_hex(unsigned long, IP, IP) |
f127e61e | 83 | ) |
b87700e3 AG |
84 | ) |
85 | ||
86 | ||
3bc29f0a | 87 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__extract_entropy, extract_entropy, |
9cf29d3e MD |
88 | |
89 | random_extract_entropy, | |
90 | ||
b87700e3 AG |
91 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, |
92 | unsigned long IP), | |
93 | ||
94 | TP_ARGS(pool_name, nbytes, entropy_count, IP) | |
95 | ) | |
96 | ||
3bc29f0a | 97 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__extract_entropy, extract_entropy_user, |
9cf29d3e MD |
98 | |
99 | random_extract_entropy_user, | |
100 | ||
b87700e3 AG |
101 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, |
102 | unsigned long IP), | |
103 | ||
104 | TP_ARGS(pool_name, nbytes, entropy_count, IP) | |
105 | ) | |
106 | ||
107 | ||
108 | ||
3bc29f0a | 109 | #endif /* LTTNG_TRACE_RANDOM_H */ |
b87700e3 AG |
110 | |
111 | /* This part must be outside protection */ | |
6ec43db8 | 112 | #include <probes/define_trace.h> |