From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Richter <tmricht@linux.ibm.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
acme@kernel.org, mhiramat@kernel.org, borntraeger@de.ibm.com,
gor@linux.ibm.com, sumanthk@linux.ibm.com,
heiko.carstens@de.ibm.com
Subject: Re: [PATCH] perf test: Test case 66 broken on s390 (lib/traceevent issue)
Date: Sat, 25 Jan 2020 01:31:53 +0900 [thread overview]
Message-ID: <20200125013153.46f05fc1f617fcd341e7060b@kernel.org> (raw)
In-Reply-To: <20200124100742.4050c15e@gandalf.local.home>
Hi Steven and Thomas,
On Fri, 24 Jan 2020 10:07:42 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> This looks like a kernel bug, not a libtraceevent parsing bug.
Totally agreed. It was my fault to update the print format.
Even if still there is a problem on s390, this patch must be
applied.
Fixes: 88903c464321 ("tracing/probe: Add ustring type for user-space string")
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
>
> > + }
> > str = malloc(len + 1);
> > if (!str) {
> > do_warning_event(event, "%s: not enough memory!",
>
> Does this patch fix it for you?
>
> -- Steve
>
> diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
> index 905b10af5d5c..d3309fceb480 100644
> --- a/kernel/trace/trace_probe.c
> +++ b/kernel/trace/trace_probe.c
> @@ -876,7 +876,8 @@ static int __set_print_fmt(struct trace_probe *tp, char *buf, int len,
> for (i = 0; i < tp->nr_args; i++) {
> parg = tp->args + i;
> if (parg->count) {
> - if (strcmp(parg->type->name, "string") == 0)
> + if ((strcmp(parg->type->name, "string") == 0) ||
> + (strcmp(parg->type->name, "ustring") == 0))
> fmt = ", __get_str(%s[%d])";
> else
> fmt = ", REC->%s[%d]";
> @@ -884,7 +885,8 @@ static int __set_print_fmt(struct trace_probe *tp, char *buf, int len,
> pos += snprintf(buf + pos, LEN_OR_ZERO,
> fmt, parg->name, j);
> } else {
> - if (strcmp(parg->type->name, "string") == 0)
> + if ((strcmp(parg->type->name, "string") == 0) ||
> + (strcmp(parg->type->name, "ustring") == 0))
> fmt = ", __get_str(%s)";
> else
> fmt = ", REC->%s";
Thank you!
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2020-01-24 16:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 7:39 [PATCH] perf test: Test case 66 broken on s390 (lib/traceevent issue) Thomas Richter
2020-01-24 15:07 ` Steven Rostedt
2020-01-24 16:31 ` Masami Hiramatsu [this message]
2020-01-24 16:36 ` Steven Rostedt
2020-01-27 7:34 ` Thomas Richter
2020-01-27 15:55 ` Steven Rostedt
2020-01-30 10:58 ` Arnaldo Carvalho de Melo
2020-01-30 12:54 ` 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=20200125013153.46f05fc1f617fcd341e7060b@kernel.org \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=borntraeger@de.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sumanthk@linux.ibm.com \
--cc=tmricht@linux.ibm.com \
/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.