perf hists: Move sort__has_sym into struct perf_hpp_list
[linux/fpc-iii.git] / include / trace / events / random.h
blob4684de344c5d96d7fb86260d37cadd3d7c76a1fe
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM random
4 #if !defined(_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_RANDOM_H
7 #include <linux/writeback.h>
8 #include <linux/tracepoint.h>
10 TRACE_EVENT(add_device_randomness,
11 TP_PROTO(int bytes, unsigned long IP),
13 TP_ARGS(bytes, IP),
15 TP_STRUCT__entry(
16 __field( int, bytes )
17 __field(unsigned long, IP )
20 TP_fast_assign(
21 __entry->bytes = bytes;
22 __entry->IP = IP;
25 TP_printk("bytes %d caller %pS",
26 __entry->bytes, (void *)__entry->IP)
29 DECLARE_EVENT_CLASS(random__mix_pool_bytes,
30 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
32 TP_ARGS(pool_name, bytes, IP),
34 TP_STRUCT__entry(
35 __field( const char *, pool_name )
36 __field( int, bytes )
37 __field(unsigned long, IP )
40 TP_fast_assign(
41 __entry->pool_name = pool_name;
42 __entry->bytes = bytes;
43 __entry->IP = IP;
46 TP_printk("%s pool: bytes %d caller %pS",
47 __entry->pool_name, __entry->bytes, (void *)__entry->IP)
50 DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes,
51 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
53 TP_ARGS(pool_name, bytes, IP)
56 DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
57 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
59 TP_ARGS(pool_name, bytes, IP)
62 TRACE_EVENT(credit_entropy_bits,
63 TP_PROTO(const char *pool_name, int bits, int entropy_count,
64 int entropy_total, unsigned long IP),
66 TP_ARGS(pool_name, bits, entropy_count, entropy_total, IP),
68 TP_STRUCT__entry(
69 __field( const char *, pool_name )
70 __field( int, bits )
71 __field( int, entropy_count )
72 __field( int, entropy_total )
73 __field(unsigned long, IP )
76 TP_fast_assign(
77 __entry->pool_name = pool_name;
78 __entry->bits = bits;
79 __entry->entropy_count = entropy_count;
80 __entry->entropy_total = entropy_total;
81 __entry->IP = IP;
84 TP_printk("%s pool: bits %d entropy_count %d entropy_total %d "
85 "caller %pS", __entry->pool_name, __entry->bits,
86 __entry->entropy_count, __entry->entropy_total,
87 (void *)__entry->IP)
90 TRACE_EVENT(push_to_pool,
91 TP_PROTO(const char *pool_name, int pool_bits, int input_bits),
93 TP_ARGS(pool_name, pool_bits, input_bits),
95 TP_STRUCT__entry(
96 __field( const char *, pool_name )
97 __field( int, pool_bits )
98 __field( int, input_bits )
101 TP_fast_assign(
102 __entry->pool_name = pool_name;
103 __entry->pool_bits = pool_bits;
104 __entry->input_bits = input_bits;
107 TP_printk("%s: pool_bits %d input_pool_bits %d",
108 __entry->pool_name, __entry->pool_bits,
109 __entry->input_bits)
112 TRACE_EVENT(debit_entropy,
113 TP_PROTO(const char *pool_name, int debit_bits),
115 TP_ARGS(pool_name, debit_bits),
117 TP_STRUCT__entry(
118 __field( const char *, pool_name )
119 __field( int, debit_bits )
122 TP_fast_assign(
123 __entry->pool_name = pool_name;
124 __entry->debit_bits = debit_bits;
127 TP_printk("%s: debit_bits %d", __entry->pool_name,
128 __entry->debit_bits)
131 TRACE_EVENT(add_input_randomness,
132 TP_PROTO(int input_bits),
134 TP_ARGS(input_bits),
136 TP_STRUCT__entry(
137 __field( int, input_bits )
140 TP_fast_assign(
141 __entry->input_bits = input_bits;
144 TP_printk("input_pool_bits %d", __entry->input_bits)
147 TRACE_EVENT(add_disk_randomness,
148 TP_PROTO(dev_t dev, int input_bits),
150 TP_ARGS(dev, input_bits),
152 TP_STRUCT__entry(
153 __field( dev_t, dev )
154 __field( int, input_bits )
157 TP_fast_assign(
158 __entry->dev = dev;
159 __entry->input_bits = input_bits;
162 TP_printk("dev %d,%d input_pool_bits %d", MAJOR(__entry->dev),
163 MINOR(__entry->dev), __entry->input_bits)
166 TRACE_EVENT(xfer_secondary_pool,
167 TP_PROTO(const char *pool_name, int xfer_bits, int request_bits,
168 int pool_entropy, int input_entropy),
170 TP_ARGS(pool_name, xfer_bits, request_bits, pool_entropy,
171 input_entropy),
173 TP_STRUCT__entry(
174 __field( const char *, pool_name )
175 __field( int, xfer_bits )
176 __field( int, request_bits )
177 __field( int, pool_entropy )
178 __field( int, input_entropy )
181 TP_fast_assign(
182 __entry->pool_name = pool_name;
183 __entry->xfer_bits = xfer_bits;
184 __entry->request_bits = request_bits;
185 __entry->pool_entropy = pool_entropy;
186 __entry->input_entropy = input_entropy;
189 TP_printk("pool %s xfer_bits %d request_bits %d pool_entropy %d "
190 "input_entropy %d", __entry->pool_name, __entry->xfer_bits,
191 __entry->request_bits, __entry->pool_entropy,
192 __entry->input_entropy)
195 DECLARE_EVENT_CLASS(random__get_random_bytes,
196 TP_PROTO(int nbytes, unsigned long IP),
198 TP_ARGS(nbytes, IP),
200 TP_STRUCT__entry(
201 __field( int, nbytes )
202 __field(unsigned long, IP )
205 TP_fast_assign(
206 __entry->nbytes = nbytes;
207 __entry->IP = IP;
210 TP_printk("nbytes %d caller %pS", __entry->nbytes, (void *)__entry->IP)
213 DEFINE_EVENT(random__get_random_bytes, get_random_bytes,
214 TP_PROTO(int nbytes, unsigned long IP),
216 TP_ARGS(nbytes, IP)
219 DEFINE_EVENT(random__get_random_bytes, get_random_bytes_arch,
220 TP_PROTO(int nbytes, unsigned long IP),
222 TP_ARGS(nbytes, IP)
225 DECLARE_EVENT_CLASS(random__extract_entropy,
226 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
227 unsigned long IP),
229 TP_ARGS(pool_name, nbytes, entropy_count, IP),
231 TP_STRUCT__entry(
232 __field( const char *, pool_name )
233 __field( int, nbytes )
234 __field( int, entropy_count )
235 __field(unsigned long, IP )
238 TP_fast_assign(
239 __entry->pool_name = pool_name;
240 __entry->nbytes = nbytes;
241 __entry->entropy_count = entropy_count;
242 __entry->IP = IP;
245 TP_printk("%s pool: nbytes %d entropy_count %d caller %pS",
246 __entry->pool_name, __entry->nbytes, __entry->entropy_count,
247 (void *)__entry->IP)
251 DEFINE_EVENT(random__extract_entropy, extract_entropy,
252 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
253 unsigned long IP),
255 TP_ARGS(pool_name, nbytes, entropy_count, IP)
258 DEFINE_EVENT(random__extract_entropy, extract_entropy_user,
259 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
260 unsigned long IP),
262 TP_ARGS(pool_name, nbytes, entropy_count, IP)
265 TRACE_EVENT(random_read,
266 TP_PROTO(int got_bits, int need_bits, int pool_left, int input_left),
268 TP_ARGS(got_bits, need_bits, pool_left, input_left),
270 TP_STRUCT__entry(
271 __field( int, got_bits )
272 __field( int, need_bits )
273 __field( int, pool_left )
274 __field( int, input_left )
277 TP_fast_assign(
278 __entry->got_bits = got_bits;
279 __entry->need_bits = need_bits;
280 __entry->pool_left = pool_left;
281 __entry->input_left = input_left;
284 TP_printk("got_bits %d still_needed_bits %d "
285 "blocking_pool_entropy_left %d input_entropy_left %d",
286 __entry->got_bits, __entry->got_bits, __entry->pool_left,
287 __entry->input_left)
290 TRACE_EVENT(urandom_read,
291 TP_PROTO(int got_bits, int pool_left, int input_left),
293 TP_ARGS(got_bits, pool_left, input_left),
295 TP_STRUCT__entry(
296 __field( int, got_bits )
297 __field( int, pool_left )
298 __field( int, input_left )
301 TP_fast_assign(
302 __entry->got_bits = got_bits;
303 __entry->pool_left = pool_left;
304 __entry->input_left = input_left;
307 TP_printk("got_bits %d nonblocking_pool_entropy_left %d "
308 "input_entropy_left %d", __entry->got_bits,
309 __entry->pool_left, __entry->input_left)
312 #endif /* _TRACE_RANDOM_H */
314 /* This part must be outside protection */
315 #include <trace/define_trace.h>