Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753259AbdFVQQX (ORCPT ); Thu, 22 Jun 2017 12:16:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33740 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753107AbdFVQQU (ORCPT ); Thu, 22 Jun 2017 12:16:20 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 640EE7D0C6 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=acme@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 640EE7D0C6 Date: Thu, 22 Jun 2017 13:16:12 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , LKML , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , linux-perf-users , magnus.karlsson@intel.com Subject: Re: [PATCH] perf probe: Fix probe definition for inlined functions Message-ID: <20170622161612.GE2170@redhat.com> References: <20170621164134.5701-1-bjorn.topel@gmail.com> <20170622190138.b9fdfaada8da0af1b8cf6990@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170622190138.b9fdfaada8da0af1b8cf6990@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 22 Jun 2017 16:16:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1880 Lines: 50 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 wrote: > > > From: Bj?rn T?pel > > > > 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 > > 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