Re: [PATCH 09/15] tracing: Introduce names for events

From
Steven Rostedt <rostedt@goodmis.org>
Date
2023-12-13 00:49:18
Also in
kexec, linux-arm-kernel, linux-devicetree, linux-doc, linux-mm, lkml
Reply to
Alexander Graf, 2023-12-13
On Wed, 13 Dec 2023 00:04:46 +0000
Alexander Graf [off-list ref] wrote:
quoted hunk ↗ jump to hunk
With KHO (Kexec HandOver), we want to preserve trace buffers. To parse
them, we need to ensure that all trace events that exist in the logs are
identical to the ones we parse as. That means we need to match the
events before and after kexec.

As a first step towards that, let's give every event a unique name. That
way we can clearly identify the event before and after kexec and restore
its ID post-kexec.

Signed-off-by: Alexander Graf <graf@amazon.com>
---
 include/linux/trace_events.h         |  1 +
 include/trace/trace_events.h         |  2 ++
 kernel/trace/blktrace.c              |  1 +
 kernel/trace/trace_branch.c          |  1 +
 kernel/trace/trace_events.c          |  3 +++
 kernel/trace/trace_functions_graph.c |  4 +++-
 kernel/trace/trace_output.c          | 13 +++++++++++++
 kernel/trace/trace_probe.c           |  3 +++
 kernel/trace/trace_syscalls.c        | 29 ++++++++++++++++++++++++++++
 9 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index d68ff9b1247f..7670224aa92d 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -149,6 +149,7 @@ struct trace_event {
 	struct hlist_node		node;
 	int				type;
 	struct trace_event_functions	*funcs;
+	const char			*name;
 };
OK, this is a hard no. We definitely need to find a different way to do
this. I'm trying hard to lower the footprint of tracing, and this just
added 8 bytes to every event on a 64 bit machine.

On my box I have 1953 events, and they are constantly growing. This just
added 15,624 bytes of tracing overhead to that machine.

That may not sound like much, but as this is only for this feature, it just
added 15K to the overhead for the majority of users.

I'm not sure how easy it is to make this a config option that takes away
that field when not set. But I would need that at a minimum.

-- Steve
Thread (29 messages) 29 messages, 5 authors, last reply 2023-12-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help