From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751868AbcGUHxI (ORCPT ); Thu, 21 Jul 2016 03:53:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39836 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751701AbcGUHxG (ORCPT ); Thu, 21 Jul 2016 03:53:06 -0400 Date: Thu, 21 Jul 2016 09:53:02 +0200 From: Jiri Olsa To: Marc Kleine-Budde Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Jiri Olsa , kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf symbols: Fix reading build id Message-ID: <20160721075302.GA7651@krava> References: <1469084947-14567-1-git-send-email-uwe@kleine-koenig.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 21 Jul 2016 07:53:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 21, 2016 at 09:21:55AM +0200, Marc Kleine-Budde wrote: > On 07/21/2016 09:09 AM, Uwe Kleine-König wrote: > > From: Uwe Kleine-König > > > > When is_regular_file(name) is called name points to a freshly allocated > > and uninitialized chunk of memory, so is_regular_file(name) is usually > > false and reading build id is skipped which makes it impossible to > > find debug infos when a build id based system is in use. > > > > Fixes: 403567217d3f ("perf symbols: Do not read symbols/data from device files") > > Signed-off-by: Uwe Kleine-König > > See https://patchwork.kernel.org/patch/9196777/ Arnaldo, could you please pull this one in? thanks, jirka > > Marc > > > --- > > tools/perf/util/symbol.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c > > index 54c4ff2b1cee..7044742c828f 100644 > > --- a/tools/perf/util/symbol.c > > +++ b/tools/perf/util/symbol.c > > @@ -1430,7 +1430,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter) > > * Read the build id if possible. This is required for > > * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work > > */ > > - if (is_regular_file(name) && > > + if (is_regular_file(dso->long_name) && > > filename__read_build_id(dso->long_name, build_id, BUILD_ID_SIZE) > 0) > > dso__set_build_id(dso, build_id); > > > > > > > -- > Pengutronix e.K. | Marc Kleine-Budde | > Industrial Linux Solutions | Phone: +49-231-2826-924 | > Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | > Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | >