From: Jiri Olsa <jolsa@redhat.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "Uwe Kleine-König" <uwe@kleine-koenig.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Jiri Olsa" <jolsa@kernel.org>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf symbols: Fix reading build id
Date: Thu, 21 Jul 2016 09:53:02 +0200 [thread overview]
Message-ID: <20160721075302.GA7651@krava> (raw)
In-Reply-To: <b9a94bb0-fcd3-7399-0f59-53be18ddb6a5@pengutronix.de>
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 <u.kleine-koenig@pengutronix.de>
> >
> > 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 <u.kleine-koenig@pengutronix.de>
>
> 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 |
>
next prev parent reply other threads:[~2016-07-21 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-21 7:09 [PATCH] perf symbols: Fix reading build id Uwe Kleine-König
2016-07-21 7:21 ` Marc Kleine-Budde
2016-07-21 7:53 ` Jiri Olsa [this message]
2016-07-22 7:34 ` Uwe Kleine-König
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=20160721075302.GA7651@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mkl@pengutronix.de \
--cc=peterz@infradead.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=uwe@kleine-koenig.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).