| 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM random |
| 3 | |
| 4 | #if !defined(LTTNG_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define LTTNG_TRACE_RANDOM_H |
| 6 | |
| 7 | #include <probes/lttng-tracepoint-event.h> |
| 8 | #include <linux/writeback.h> |
| 9 | |
| 10 | LTTNG_TRACEPOINT_EVENT_CLASS(random__mix_pool_bytes, |
| 11 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), |
| 12 | |
| 13 | TP_ARGS(pool_name, bytes, IP), |
| 14 | |
| 15 | TP_FIELDS( |
| 16 | ctf_string(pool_name, pool_name) |
| 17 | ctf_integer(int, bytes, bytes) |
| 18 | ctf_integer(unsigned long, IP, IP) |
| 19 | ) |
| 20 | ) |
| 21 | |
| 22 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__mix_pool_bytes, mix_pool_bytes, |
| 23 | |
| 24 | random_mix_pool_bytes, |
| 25 | |
| 26 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), |
| 27 | |
| 28 | TP_ARGS(pool_name, bytes, IP) |
| 29 | ) |
| 30 | |
| 31 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__mix_pool_bytes, mix_pool_bytes_nolock, |
| 32 | |
| 33 | random_mix_pool_bytes_nolock, |
| 34 | |
| 35 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), |
| 36 | |
| 37 | TP_ARGS(pool_name, bytes, IP) |
| 38 | ) |
| 39 | |
| 40 | LTTNG_TRACEPOINT_EVENT_MAP(credit_entropy_bits, |
| 41 | |
| 42 | random_credit_entropy_bits, |
| 43 | |
| 44 | TP_PROTO(const char *pool_name, int bits, int entropy_count, |
| 45 | int entropy_total, unsigned long IP), |
| 46 | |
| 47 | TP_ARGS(pool_name, bits, entropy_count, entropy_total, IP), |
| 48 | |
| 49 | TP_FIELDS( |
| 50 | ctf_string(pool_name, pool_name) |
| 51 | ctf_integer(int, bits, bits) |
| 52 | ctf_integer(int, entropy_count, entropy_count) |
| 53 | ctf_integer(int, entropy_total, entropy_total) |
| 54 | ctf_integer(unsigned long, IP, IP) |
| 55 | ) |
| 56 | ) |
| 57 | |
| 58 | LTTNG_TRACEPOINT_EVENT_MAP(get_random_bytes, |
| 59 | |
| 60 | random_get_random_bytes, |
| 61 | |
| 62 | TP_PROTO(int nbytes, unsigned long IP), |
| 63 | |
| 64 | TP_ARGS(nbytes, IP), |
| 65 | |
| 66 | TP_FIELDS( |
| 67 | ctf_integer(int, nbytes, nbytes) |
| 68 | ctf_integer(unsigned long, IP, IP) |
| 69 | ) |
| 70 | ) |
| 71 | |
| 72 | LTTNG_TRACEPOINT_EVENT_CLASS(random__extract_entropy, |
| 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 | |
| 78 | TP_FIELDS( |
| 79 | ctf_string(pool_name, pool_name) |
| 80 | ctf_integer(int, nbytes, nbytes) |
| 81 | ctf_integer(int, entropy_count, entropy_count) |
| 82 | ctf_integer(unsigned long, IP, IP) |
| 83 | ) |
| 84 | ) |
| 85 | |
| 86 | |
| 87 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__extract_entropy, extract_entropy, |
| 88 | |
| 89 | random_extract_entropy, |
| 90 | |
| 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 | |
| 97 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(random__extract_entropy, extract_entropy_user, |
| 98 | |
| 99 | random_extract_entropy_user, |
| 100 | |
| 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 | |
| 109 | #endif /* LTTNG_TRACE_RANDOM_H */ |
| 110 | |
| 111 | /* This part must be outside protection */ |
| 112 | #include <probes/define_trace.h> |