From: Masami Hiramatsu <mhiramat@kernel.org>
To: Omar Sandoval <osandov@osandov.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>, Namhyung Kim <namhyung@gmail.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 17:02:32 +0900 [thread overview]
Message-ID: <20160607170232.575878d689a656f53d357e22@kernel.org> (raw)
In-Reply-To: <c4218c9a114c287fec9f0984f180f72c7f3c954b.1464916142.git.osandov@fb.com>
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 :)
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2016-06-07 8:02 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 [this message]
2016-06-07 13:41 ` Namhyung Kim
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=20160607170232.575878d689a656f53d357e22@kernel.org \
--to=mhiramat@kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.