* [PATCH 0/4] random/trace: remove unused function
@ 2020-05-21 13:46 Yann Droneaud
2020-05-21 13:46 ` [PATCH 1/4] random/trace: remove unused trace_random_read() Yann Droneaud
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Yann Droneaud @ 2020-05-21 13:46 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar, Theodore Ts'o
Cc: Andy Lutomirski, linux-kernel, Yann Droneaud
Hi,
After simplifications brought recently to random [1], some
trace functions are no more needed. This patchset removes
them.
[1] https://lore.kernel.org/linux-api/cover.1577088521.git.luto@kernel.org/
Yann Droneaud (4):
random/trace: remove unused trace_random_read()
random/trace: remove unused trace_push_to_pool()
random/trace: remove unused trace_extract_entropy_user()
random/trace: remove unused trace_xfer_secondary_pool()
include/trace/events/random.h | 93 +----------------------------------
1 file changed, 1 insertion(+), 92 deletions(-)
--
2.25.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] random/trace: remove unused trace_random_read()
2020-05-21 13:46 [PATCH 0/4] random/trace: remove unused function Yann Droneaud
@ 2020-05-21 13:46 ` Yann Droneaud
2020-05-21 13:46 ` [PATCH 2/4] random/trace: remove unused trace_push_to_pool() Yann Droneaud
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Yann Droneaud @ 2020-05-21 13:46 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar, Theodore Ts'o
Cc: Andy Lutomirski, linux-kernel, Yann Droneaud
Since commit 30c08efec888 ('random: make /dev/random be almost like /dev/urandom'),
trace_random_read() is unused.
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
---
include/trace/events/random.h | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
index 32c10a515e2d..087ae7e8ae13 100644
--- a/include/trace/events/random.h
+++ b/include/trace/events/random.h
@@ -260,31 +260,6 @@ DEFINE_EVENT(random__extract_entropy, extract_entropy_user,
TP_ARGS(pool_name, nbytes, entropy_count, IP)
);
-TRACE_EVENT(random_read,
- TP_PROTO(int got_bits, int need_bits, int pool_left, int input_left),
-
- TP_ARGS(got_bits, need_bits, pool_left, input_left),
-
- TP_STRUCT__entry(
- __field( int, got_bits )
- __field( int, need_bits )
- __field( int, pool_left )
- __field( int, input_left )
- ),
-
- TP_fast_assign(
- __entry->got_bits = got_bits;
- __entry->need_bits = need_bits;
- __entry->pool_left = pool_left;
- __entry->input_left = input_left;
- ),
-
- TP_printk("got_bits %d still_needed_bits %d "
- "blocking_pool_entropy_left %d input_entropy_left %d",
- __entry->got_bits, __entry->got_bits, __entry->pool_left,
- __entry->input_left)
-);
-
TRACE_EVENT(urandom_read,
TP_PROTO(int got_bits, int pool_left, int input_left),
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] random/trace: remove unused trace_push_to_pool()
2020-05-21 13:46 [PATCH 0/4] random/trace: remove unused function Yann Droneaud
2020-05-21 13:46 ` [PATCH 1/4] random/trace: remove unused trace_random_read() Yann Droneaud
@ 2020-05-21 13:46 ` Yann Droneaud
2020-05-21 13:46 ` [PATCH 3/4] random/trace: remove unused trace_extract_entropy_user() Yann Droneaud
2020-05-21 13:46 ` [PATCH 4/4] random/trace: remove unused trace_xfer_secondary_pool() Yann Droneaud
3 siblings, 0 replies; 5+ messages in thread
From: Yann Droneaud @ 2020-05-21 13:46 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar, Theodore Ts'o
Cc: Andy Lutomirski, linux-kernel, Yann Droneaud
Since commit 90ea1c6436d2 ('random: remove the blocking pool')
trace_push_to_pool() is unused.
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
---
include/trace/events/random.h | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
index 087ae7e8ae13..d5aa662294fe 100644
--- a/include/trace/events/random.h
+++ b/include/trace/events/random.h
@@ -85,28 +85,6 @@ TRACE_EVENT(credit_entropy_bits,
__entry->entropy_count, (void *)__entry->IP)
);
-TRACE_EVENT(push_to_pool,
- TP_PROTO(const char *pool_name, int pool_bits, int input_bits),
-
- TP_ARGS(pool_name, pool_bits, input_bits),
-
- TP_STRUCT__entry(
- __field( const char *, pool_name )
- __field( int, pool_bits )
- __field( int, input_bits )
- ),
-
- TP_fast_assign(
- __entry->pool_name = pool_name;
- __entry->pool_bits = pool_bits;
- __entry->input_bits = input_bits;
- ),
-
- TP_printk("%s: pool_bits %d input_pool_bits %d",
- __entry->pool_name, __entry->pool_bits,
- __entry->input_bits)
-);
-
TRACE_EVENT(debit_entropy,
TP_PROTO(const char *pool_name, int debit_bits),
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] random/trace: remove unused trace_extract_entropy_user()
2020-05-21 13:46 [PATCH 0/4] random/trace: remove unused function Yann Droneaud
2020-05-21 13:46 ` [PATCH 1/4] random/trace: remove unused trace_random_read() Yann Droneaud
2020-05-21 13:46 ` [PATCH 2/4] random/trace: remove unused trace_push_to_pool() Yann Droneaud
@ 2020-05-21 13:46 ` Yann Droneaud
2020-05-21 13:46 ` [PATCH 4/4] random/trace: remove unused trace_xfer_secondary_pool() Yann Droneaud
3 siblings, 0 replies; 5+ messages in thread
From: Yann Droneaud @ 2020-05-21 13:46 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar, Theodore Ts'o
Cc: Andy Lutomirski, linux-kernel, Yann Droneaud
Since commit 90ea1c6436d2 ('random: remove the blocking pool')
trace_extract_entropy_user() is unused.
As the result, trace_extract_entropy() is the only trace
function needed, thus there's no need for a separate event
class / event.
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
---
include/trace/events/random.h | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
index d5aa662294fe..c2256250e3ef 100644
--- a/include/trace/events/random.h
+++ b/include/trace/events/random.h
@@ -198,7 +198,7 @@ DEFINE_EVENT(random__get_random_bytes, get_random_bytes_arch,
TP_ARGS(nbytes, IP)
);
-DECLARE_EVENT_CLASS(random__extract_entropy,
+TRACE_EVENT(extract_entropy,
TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
unsigned long IP),
@@ -223,21 +223,6 @@ DECLARE_EVENT_CLASS(random__extract_entropy,
(void *)__entry->IP)
);
-
-DEFINE_EVENT(random__extract_entropy, extract_entropy,
- TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
- unsigned long IP),
-
- TP_ARGS(pool_name, nbytes, entropy_count, IP)
-);
-
-DEFINE_EVENT(random__extract_entropy, extract_entropy_user,
- TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
- unsigned long IP),
-
- TP_ARGS(pool_name, nbytes, entropy_count, IP)
-);
-
TRACE_EVENT(urandom_read,
TP_PROTO(int got_bits, int pool_left, int input_left),
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] random/trace: remove unused trace_xfer_secondary_pool()
2020-05-21 13:46 [PATCH 0/4] random/trace: remove unused function Yann Droneaud
` (2 preceding siblings ...)
2020-05-21 13:46 ` [PATCH 3/4] random/trace: remove unused trace_extract_entropy_user() Yann Droneaud
@ 2020-05-21 13:46 ` Yann Droneaud
3 siblings, 0 replies; 5+ messages in thread
From: Yann Droneaud @ 2020-05-21 13:46 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar, Theodore Ts'o
Cc: Andy Lutomirski, linux-kernel, Yann Droneaud
Since commit 84df7cdfbb21 ('random: delete code to pull data into pools'),
trace_xfer_secondary_pool() is unused.
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
---
include/trace/events/random.h | 29 -----------------------------
1 file changed, 29 deletions(-)
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
index c2256250e3ef..8cf287423571 100644
--- a/include/trace/events/random.h
+++ b/include/trace/events/random.h
@@ -139,35 +139,6 @@ TRACE_EVENT(add_disk_randomness,
MINOR(__entry->dev), __entry->input_bits)
);
-TRACE_EVENT(xfer_secondary_pool,
- TP_PROTO(const char *pool_name, int xfer_bits, int request_bits,
- int pool_entropy, int input_entropy),
-
- TP_ARGS(pool_name, xfer_bits, request_bits, pool_entropy,
- input_entropy),
-
- TP_STRUCT__entry(
- __field( const char *, pool_name )
- __field( int, xfer_bits )
- __field( int, request_bits )
- __field( int, pool_entropy )
- __field( int, input_entropy )
- ),
-
- TP_fast_assign(
- __entry->pool_name = pool_name;
- __entry->xfer_bits = xfer_bits;
- __entry->request_bits = request_bits;
- __entry->pool_entropy = pool_entropy;
- __entry->input_entropy = input_entropy;
- ),
-
- TP_printk("pool %s xfer_bits %d request_bits %d pool_entropy %d "
- "input_entropy %d", __entry->pool_name, __entry->xfer_bits,
- __entry->request_bits, __entry->pool_entropy,
- __entry->input_entropy)
-);
-
DECLARE_EVENT_CLASS(random__get_random_bytes,
TP_PROTO(int nbytes, unsigned long IP),
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-21 14:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-21 13:46 [PATCH 0/4] random/trace: remove unused function Yann Droneaud
2020-05-21 13:46 ` [PATCH 1/4] random/trace: remove unused trace_random_read() Yann Droneaud
2020-05-21 13:46 ` [PATCH 2/4] random/trace: remove unused trace_push_to_pool() Yann Droneaud
2020-05-21 13:46 ` [PATCH 3/4] random/trace: remove unused trace_extract_entropy_user() Yann Droneaud
2020-05-21 13:46 ` [PATCH 4/4] random/trace: remove unused trace_xfer_secondary_pool() Yann Droneaud
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox