[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2230bb1eb14e238b40429ebf051f31d9183f51f.camel@nokia.com>
Date: Fri, 10 Jan 2020 09:29:22 +0000
From: "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@...ia.com>
To: "mhiramat@...nel.org" <mhiramat@...nel.org>,
"arnaldo.melo@...il.com" <arnaldo.melo@...il.com>
CC: "namhyung@...nel.org" <namhyung@...nel.org>,
"jolsa@...hat.com" <jolsa@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [BUGFIX PATCH 1/4] perf probe: Skip end-of-sequence and non
statement lines
On Wed, 2019-11-06 at 17:04 -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Oct 30, 2019 at 04:09:21PM +0900, Masami Hiramatsu escreveu:
> > Skip end-of-sequence and non-statement lines while walking
> > through lines list.
> >
> > The "end-of-sequence" line information means
> > "the current address is that of the first byte after the
> > end of a sequence of target machine instructions."
> > (DWARF version 4 spec 6.2.2)
> > This actually means out of scope and we can not probe on it.
>
> Thanks, tested before and after and applied,
>
> - Arnaldo
Hello,
I'm getting perf test failures after this patch hit mainline and LTS
kernels.
With v5.5-rc5 (x86_64 gcc-9.2.1) I get:
# perf test
...
69: Add vfs_getname probe to get syscall args filenames : FAILED!
71: Use vfs_getname probe to get syscall args filenames : FAILED!
73: Check open filename arg using perf trace + vfs_getname: FAILED!
Reason is that it's no longer possible to add probe in getname_flags()
line "result->uptr = filename;", and this is causing the perf tests to
fail:
# perf probe -L getname_flags
<getname_flags@...ot/linux-core2/fs/namei.c:0>
0 getname_flags(const char __user *filename, int flags, int *empty)
{
...
61 result->refcnt = 1;
/* The empty path is special. */
63 if (unlikely(!len)) {
64 if (empty)
65 *empty = 1;
66 if (!(flags & LOOKUP_EMPTY)) {
67 putname(result);
68 return ERR_PTR(-ENOENT);
}
}
result->uptr = filename;
73 result->aname = NULL;
audit_getname(result);
return result;
}
I can reproduce it locally with a kernel config change (with attached KVM
guest config): when kernel is built with CONFIG_MCORE2=y the issue
reproduces. When switching to CONFIG_GENERIC_CPU=y it's again possible to
add the probe to the source line and the tests pass.
Diffing the disassembly of fs/namei.o between CONFIG_MCORE2=y and
CONFIG_GENERIC_CPU=y, all instructions in getname_flags() are the same,
but there are some changes in the instruction ordering.
Any ideas what's going wrong here...?
Something wrong in the dwarf data?
In 4.19.y it's enough to revert this patch ("perf probe: Skip end-of-
sequence and non statement lines") to fix this (assuming it's bug...), but
in v5.5-rc5 it's not enough (switching to v5.4 perf fixed it).
-Tommi
View attachment "config-perf-probe" of type "text/plain" (107439 bytes)
Powered by blists - more mailing lists