diff options
author | Theodore Ts'o <tytso@mit.edu> | 2013-09-12 14:10:25 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-10-10 14:32:16 -0400 |
commit | 5910895f0e868d4f70303922ed00ccdc328b3c30 (patch) | |
tree | c51b3a58cad1a18e941f1d0ed1c56747944aa3cc /include/trace/events | |
parent | 30e37ec516ae5a6957596de7661673c615c82ea4 (diff) |
random: fix the tracepoint for get_random_bytes(_arch)
Fix a problem where get_random_bytes_arch() was calling the tracepoint
get_random_bytes(). So add a new tracepoint for
get_random_bytes_arch(), and make get_random_bytes() and
get_random_bytes_arch() call their correct tracepoint.
Also, add a new tracepoint for add_device_randomness()
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace/events')
-rw-r--r-- | include/trace/events/random.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/include/trace/events/random.h b/include/trace/events/random.h index 422df19de732..2ffcaec5860a 100644 --- a/include/trace/events/random.h +++ b/include/trace/events/random.h | |||
@@ -7,6 +7,25 @@ | |||
7 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
9 | 9 | ||
10 | TRACE_EVENT(add_device_randomness, | ||
11 | TP_PROTO(int bytes, unsigned long IP), | ||
12 | |||
13 | TP_ARGS(bytes, IP), | ||
14 | |||
15 | TP_STRUCT__entry( | ||
16 | __field( int, bytes ) | ||
17 | __field(unsigned long, IP ) | ||
18 | ), | ||
19 | |||
20 | TP_fast_assign( | ||
21 | __entry->bytes = bytes; | ||
22 | __entry->IP = IP; | ||
23 | ), | ||
24 | |||
25 | TP_printk("bytes %d caller %pF", | ||
26 | __entry->bytes, (void *)__entry->IP) | ||
27 | ); | ||
28 | |||
10 | DECLARE_EVENT_CLASS(random__mix_pool_bytes, | 29 | DECLARE_EVENT_CLASS(random__mix_pool_bytes, |
11 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), | 30 | TP_PROTO(const char *pool_name, int bytes, unsigned long IP), |
12 | 31 | ||
@@ -68,7 +87,7 @@ TRACE_EVENT(credit_entropy_bits, | |||
68 | (void *)__entry->IP) | 87 | (void *)__entry->IP) |
69 | ); | 88 | ); |
70 | 89 | ||
71 | TRACE_EVENT(get_random_bytes, | 90 | DECLARE_EVENT_CLASS(random__get_random_bytes, |
72 | TP_PROTO(int nbytes, unsigned long IP), | 91 | TP_PROTO(int nbytes, unsigned long IP), |
73 | 92 | ||
74 | TP_ARGS(nbytes, IP), | 93 | TP_ARGS(nbytes, IP), |
@@ -86,6 +105,18 @@ TRACE_EVENT(get_random_bytes, | |||
86 | TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP) | 105 | TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP) |
87 | ); | 106 | ); |
88 | 107 | ||
108 | DEFINE_EVENT(random__get_random_bytes, get_random_bytes, | ||
109 | TP_PROTO(int nbytes, unsigned long IP), | ||
110 | |||
111 | TP_ARGS(nbytes, IP) | ||
112 | ); | ||
113 | |||
114 | DEFINE_EVENT(random__get_random_bytes, get_random_bytes_arch, | ||
115 | TP_PROTO(int nbytes, unsigned long IP), | ||
116 | |||
117 | TP_ARGS(nbytes, IP) | ||
118 | ); | ||
119 | |||
89 | DECLARE_EVENT_CLASS(random__extract_entropy, | 120 | DECLARE_EVENT_CLASS(random__extract_entropy, |
90 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, | 121 | TP_PROTO(const char *pool_name, int nbytes, int entropy_count, |
91 | unsigned long IP), | 122 | unsigned long IP), |