From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Song Shan Gong <gongss@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Jiri Olsa <jolsa@kernel.org>, David Ahern <dsahern@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: use right filename to test
Date: Tue, 5 Jul 2016 10:24:06 -0300 [thread overview]
Message-ID: <20160705132406.GA2939@kernel.org> (raw)
In-Reply-To: <1467721637-14918-1-git-send-email-gongss@linux.vnet.ibm.com>
Em Tue, Jul 05, 2016 at 08:27:17PM +0800, Song Shan Gong escreveu:
> When trying to read buildid from file in function
> tools/perf/util/symbol.c:dso_load(), perf used wrong filename to test. The
> variable 'name' has just allocated and uninitialized before this
> sentence.Obviously, the test 'is_regular_file()' is for the latter
> 'filename__read_build_id()', so the right filename ought to be 'dso->long_name'.
Thanks, this is a duplicate patch, this patch has been already submitted
by Jiri Olsa and merged:
https://git.kernel.org/cgit/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=ed7b630b310775f3b6c0b360ede7a12cd8dff6fe
- Arnaldo
> Signed-off-by: Song Shan Gong <gongss@linux.vnet.ibm.com>
> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> 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 54c4ff2..7044742 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);
>
> --
> 2.3.0
prev parent reply other threads:[~2016-07-05 13:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 12:27 [PATCH] perf: use right filename to test Song Shan Gong
2016-07-05 13:24 ` 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=20160705132406.GA2939@kernel.org \
--to=acme@kernel.org \
--cc=borntraeger@de.ibm.com \
--cc=dsahern@gmail.com \
--cc=gongss@linux.vnet.ibm.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.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 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.