mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Omar Sandoval <osandov@osandov.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, kernel-team@fb.com,
	Omar Sandoval <osandov@fb.com>
Subject: Re: [PATCH v2 3/3] tracing: make "string" the default type for [ku]probe event $comm
Date: Tue, 7 Jun 2016 22:41:33 +0900	[thread overview]
Message-ID: <20160607134133.GB24922@danjae.aot.lge.com> (raw)
In-Reply-To: <20160607170232.575878d689a656f53d357e22@kernel.org>

On Tue, Jun 07, 2016 at 05:02:32PM +0900, Masami Hiramatsu wrote:
> On Thu,  2 Jun 2016 18:11:03 -0700
> Omar Sandoval <osandov@osandov.com> wrote:
> 
> > From: Omar Sandoval <osandov@fb.com>
> > 
> > You'd only ever want $comm as a string, but the default is still u64.
> > Push the type parsing later so we can decide based on the actual
> > fetcharg and make "string" the default for $comm.
> 
> Hmm, at this moment, I'd rather like a small hack in 
> traceprobe_parse_probe_arg() as like below:
> 
> --- a/kernel/trace/trace_probe.c
> +++ b/kernel/trace/trace_probe.c
> @@ -522,6 +522,12 @@ int traceprobe_parse_probe_arg(char *arg, ssize_t *size,
>                 arg[t - parg->comm] = '\0';
>                 t++;
>         }
> +       /*
> +        * The default type of "$comm" should be a string, and it must not
> +        * be dereferred
> +        */
> +       if (!t && strcmp("$comm", arg))
> +               t = "string";
>         parg->type = find_fetch_type(t, ftbl);
>         if (!parg->type) {
>                 pr_info("Unsupported type: %s\n", t);
> 
> This is not general, but easy to review :)

+1


Thanks,
Namhyung

  reply	other threads:[~2016-06-07 13:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03  1:11 [PATCH v2 0/3] tracing: expose current->comm to [ku]probe events Omar Sandoval
2016-06-03  1:11 ` [PATCH v2 1/3] tracing: document "string_size" [ku]probe type Omar Sandoval
2016-06-07  6:29   ` Masami Hiramatsu
2016-06-03  1:11 ` [PATCH v2 2/3] tracing: expose current->comm to [ku]probe events Omar Sandoval
2016-06-07  7:24   ` Masami Hiramatsu
2016-06-07 13:40     ` Namhyung Kim
2016-06-03  1:11 ` [PATCH v2 3/3] tracing: make "string" the default type for [ku]probe event $comm Omar Sandoval
2016-06-07  8:02   ` Masami Hiramatsu
2016-06-07 13:41     ` Namhyung Kim [this message]
2016-06-08 13:43       ` Steven Rostedt

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=20160607134133.GB24922@danjae.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=osandov@fb.com \
    --cc=osandov@osandov.com \
    --cc=rostedt@goodmis.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

all inboxes | Powered by JetHome®