linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Axel Rasmussen <axelrasmussen@google.com>
To: Tom Zanussi <zanussi@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/1] tracing: support dynamic string field types for synthetic events
Date: Fri, 25 Sep 2020 13:57:11 -0700	[thread overview]
Message-ID: <CAJHvVcgfphkarK9mFzcKPm9RimH_eZQbYTDrOaXLp5+m+20wTA@mail.gmail.com> (raw)
In-Reply-To: <cb89ebee230aedc9b5b6668bb333a258fc971b30.camel@kernel.org>

On Fri, Sep 25, 2020 at 12:48 PM Tom Zanussi <zanussi@kernel.org> wrote:
>
> Hi Axel,
>
> On Fri, 2020-09-25 at 12:08 -0700, Axel Rasmussen wrote:
> > 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.
>
> Changing check_synth_field() is one of the things that will need to
> change for this to work - I'm working on a patch but am kind of in the
> middle of it, if you can wait - I expect to be able to post something
> Monday...
>
> Thanks,
>
> Tom

Absolutely, no problem waiting. I didn't mean to come off as being
impatient; mostly since I had already hacked this together a few days
ago, I figured it was worth an e-mail in case it could save you some
effort. I have no problem dropping it. :) Thanks for working on this!

>
> >
> > 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
> >
>

      reply	other threads:[~2020-09-25 20:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJHvVcgfphkarK9mFzcKPm9RimH_eZQbYTDrOaXLp5+m+20wTA@mail.gmail.com \
    --to=axelrasmussen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=zanussi@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).