linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] tracing: support dynamic string field types for synthetic events
@ 2020-09-25 19:08 Axel Rasmussen
  2020-09-25 19:08 ` [RFC PATCH 1/1] " Axel Rasmussen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Axel Rasmussen @ 2020-09-25 19:08 UTC (permalink / raw)
  To: Steven Rostedt, Tom Zanussi; +Cc: linux-kernel, Axel Rasmussen

Hi Steven and Tom,

In this thread: https://lkml.org/lkml/2020/9/17/1015 we discussed how to plumb
dynamic strings into synthetic events. Tom, you proposed adding a new dynamic
string type to synthetic event definition like "char foo[]".

I'm sending this patch because it may be simpler than implementing that (I'm
not too familiar with the tracing infrastructure, apologies if this is not
true), and in my testing it seems sufficient to address my use case. I tested
both setting up a synthetic event as Steven described in the other thread, as
well as doing an analogous thing with a small bpftrace program, and both work as
expected with this patch.

This is because I happen to know there's an upper bound on the length of the
string in question, so I can just define a "char memcg_path[256]" in the
synthetic event, and I can be sure the string won't be truncated.

Let me know what you think. Happy to drop this and wait for Tom's suggested
approach instead.

Axel Rasmussen (1):
  tracing: support dynamic string field types for synthetic events

 kernel/trace/trace_events_hist.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

--
2.28.0.681.g6f77f65b4e-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-25 20:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 19:08 [RFC PATCH 0/1] tracing: support dynamic string field types for synthetic events Axel Rasmussen
2020-09-25 19:08 ` [RFC PATCH 1/1] " Axel Rasmussen
2020-09-25 19:53   ` Tom Zanussi
2020-09-25 19:27 ` [RFC PATCH 0/1] " Steven Rostedt
2020-09-25 19:48 ` Tom Zanussi
2020-09-25 20:57   ` Axel Rasmussen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).