From: Masami Hiramatsu <mhiramat@kernel.org> To: "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@nokia.com> Cc: "arnaldo.melo@gmail.com" <arnaldo.melo@gmail.com>, "namhyung@kernel.org" <namhyung@kernel.org>, "jolsa@redhat.com" <jolsa@redhat.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [BUGFIX PATCH 1/4] perf probe: Skip end-of-sequence and non statement lines Date: Sat, 11 Jan 2020 00:43:23 +0900 [thread overview] Message-ID: <20200111004323.ebeebf40191d2e8956602513@kernel.org> (raw) In-Reply-To: <f2230bb1eb14e238b40429ebf051f31d9183f51f.camel@nokia.com> Hi Tommi, Thank you for reporting! On Fri, 10 Jan 2020 09:29:22 +0000 "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@nokia.com> wrote: > > 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@/root/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? Hmm, I guess gcc's dwarf generator gets some effects from the optimizer. Maybe since the optimizer reordering the insturction, the dwarf generator might lose the line statement information. For example, if instructions from different lines are mixed, it is hard to say "this is the begining of a line". > > 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). I think perf test should be fixed to use more stable lines. (But I'm not sure why it uses this line...) Thank you, -- Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2020-01-10 15:43 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-30 7:09 [BUGFIX PATCH 0/4] perf probe: Fixes bugs in show-lines and show vars etc Masami Hiramatsu 2019-10-30 7:09 ` [BUGFIX PATCH 1/4] perf probe: Skip end-of-sequence and non statement lines Masami Hiramatsu 2019-11-06 20:04 ` Arnaldo Carvalho de Melo 2020-01-10 9:29 ` Rantala, Tommi T. (Nokia - FI/Espoo) 2020-01-10 15:43 ` Masami Hiramatsu [this message] 2019-11-12 11:17 ` [tip: perf/core] " tip-bot2 for Masami Hiramatsu 2019-10-30 7:09 ` [BUGFIX PATCH 2/4] perf probe: Filter out instances except for inlined subroutine and subprogram Masami Hiramatsu 2019-11-06 20:06 ` Arnaldo Carvalho de Melo 2019-11-12 11:17 ` [tip: perf/core] " tip-bot2 for Masami Hiramatsu 2019-10-30 7:09 ` [BUGFIX PATCH 3/4] perf probe: Fix to show calling lines of inlined functions Masami Hiramatsu 2019-11-06 20:08 ` Arnaldo Carvalho de Melo 2019-11-12 11:17 ` [tip: perf/core] " tip-bot2 for Masami Hiramatsu 2019-10-30 7:09 ` [BUGFIX PATCH 4/4] perf probe: Skip overlapped location on searching variables Masami Hiramatsu 2019-11-06 20:09 ` Arnaldo Carvalho de Melo 2019-11-12 11:17 ` [tip: perf/core] " tip-bot2 for Masami Hiramatsu
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=20200111004323.ebeebf40191d2e8956602513@kernel.org \ --to=mhiramat@kernel.org \ --cc=arnaldo.melo@gmail.com \ --cc=jolsa@redhat.com \ --cc=linux-kernel@vger.kernel.org \ --cc=namhyung@kernel.org \ --cc=tommi.t.rantala@nokia.com \ --subject='Re: [BUGFIX PATCH 1/4] perf probe: Skip end-of-sequence and non statement lines' \ /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
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.