[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200125013153.46f05fc1f617fcd341e7060b@kernel.org>
Date: Sat, 25 Jan 2020 01:31:53 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Richter <tmricht@...ux.ibm.com>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
acme@...nel.org, mhiramat@...nel.org, borntraeger@...ibm.com,
gor@...ux.ibm.com, sumanthk@...ux.ibm.com,
heiko.carstens@...ibm.com
Subject: Re: [PATCH] perf test: Test case 66 broken on s390 (lib/traceevent
issue)
Hi Steven and Thomas,
On Fri, 24 Jan 2020 10:07:42 -0500
Steven Rostedt <rostedt@...dmis.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@...nel.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@...nel.org>
Powered by blists - more mailing lists