From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: "Björn Töpel" <bjorn.topel@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
"Björn Töpel" <bjorn.topel@intel.com>,
linux-perf-users <linux-perf-users@vger.kernel.org>,
magnus.karlsson@intel.com
Subject: Re: [PATCH] perf probe: Fix probe definition for inlined functions
Date: Thu, 22 Jun 2017 13:16:12 -0300 [thread overview]
Message-ID: <20170622161612.GE2170@redhat.com> (raw)
In-Reply-To: <20170622190138.b9fdfaada8da0af1b8cf6990@kernel.org>
Em Thu, Jun 22, 2017 at 07:01:38PM +0900, Masami Hiramatsu escreveu:
> On Wed, 21 Jun 2017 18:41:34 +0200
> Björn Töpel <bjorn.topel@gmail.com> wrote:
>
> > From: Björn Töpel <bjorn.topel@intel.com>
> >
> > In commit 613f050d68a8 ("perf probe: Fix to probe on gcc generated
> > functions in modules"), the offset from symbol is, incorrectly, added
> > to the trace point address. This leads to incorrect probe trace points
> > for inlined functions and when using relative line number on symbols.
> >
> > Prior this patch:
> > $ perf probe -m nf_nat -D in_range
> > p:probe/in_range nf_nat:in_range.isra.9+0
> > $ perf probe -m i40e -D i40e_clean_rx_irq
> > p:probe/i40e_clean_rx_irq i40e:i40e_napi_poll+2212
> > $ perf probe -m i40e -D i40e_clean_rx_irq:16
> > p:probe/i40e_clean_rx_irq i40e:i40e_lan_xmit_frame+626
> >
> > After:
> > $ perf probe -m nf_nat -D in_range
> > p:probe/in_range nf_nat:in_range.isra.9+0
> > $ perf probe -m i40e -D i40e_clean_rx_irq
> > p:probe/i40e_clean_rx_irq i40e:i40e_napi_poll+1106
> > $ perf probe -m i40e -D i40e_clean_rx_irq:16
> > p:probe/i40e_clean_rx_irq i40e:i40e_napi_poll+2665
>
> OK, I've confirmed it. This bug also affects -D option for
> offline probes...
>
> $ ./perf probe -k ~/kbin/linux.x86_64/vmlinux -vD vfs_read:11
> probe-definition(0): vfs_read:11
> [...]
> Try to find probe point from debuginfo.
> Matched function: vfs_read [28b211e]
> Probe point found: vfs_read+90 <- here vfs_read+90
> Found 1 probe_trace_events.
> p:probe/vfs_read vfs_read+180 <- here vfs_read+180 = 90+90
>
> So offset to be doubled...
>
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
>
> Arnaldo, this should go to urgent/stable.
Thanks for checking, I'll get it into tools/urgent and CC stable, the
Fixes tag should be enough for stable maintainers to figure out what
kernels should get it.
- Arnaldo
prev parent reply other threads:[~2017-06-22 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-21 16:41 [PATCH] perf probe: Fix probe definition for inlined functions Björn Töpel
2017-06-22 10:01 ` Masami Hiramatsu
2017-06-22 16:16 ` Arnaldo Carvalho de Melo [this message]
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=20170622161612.GE2170@redhat.com \
--to=acme@redhat.com \
--cc=bjorn.topel@gmail.com \
--cc=bjorn.topel@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=magnus.karlsson@intel.com \
--cc=mhiramat@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).