From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 15/19] perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too
Date: Thu, 1 Sep 2016 13:45:41 -0300 [thread overview]
Message-ID: <1472748345-23417-16-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1472748345-23417-1-git-send-email-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
We can allow aliases to be kept, but we were checking this just when
loading vmlinux files, be consistent, do it for any symbol table loading
code that calls symbol__fixup_duplicate() by making this function check
.allow_aliases instead.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 680d926a8cb0 ("perf symbols: Allow symbol alias when loading map for symbol name")
Link: http://lkml.kernel.org/n/tip-z0avp0s6cfjckc4xj3pdfjdz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol-elf.c | 3 +--
tools/perf/util/symbol.c | 3 +++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index e680371bd5c9..9ba6e49ead62 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -1136,8 +1136,7 @@ new_symbol:
* For misannotated, zeroed, ASM function sizes.
*/
if (nr > 0) {
- if (!symbol_conf.allow_aliases)
- symbols__fixup_duplicate(&dso->symbols[map->type]);
+ symbols__fixup_duplicate(&dso->symbols[map->type]);
symbols__fixup_end(&dso->symbols[map->type]);
if (kmap) {
/*
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 863d69c45b8a..ef2f913de662 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -153,6 +153,9 @@ void symbols__fixup_duplicate(struct rb_root *symbols)
struct rb_node *nd;
struct symbol *curr, *next;
+ if (symbol_conf.allow_aliases)
+ return;
+
nd = rb_first(symbols);
while (nd) {
--
2.7.4
next prev parent reply other threads:[~2016-09-01 16:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 16:45 [GIT PULL 00/19] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 01/19] perf probe: Remove unused tracing_dir variable Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 02/19] perf tools: Fix error handling of lzma decompression Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 06/19] perf symbols: Demangle symbols for synthesized @plt entries Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 07/19] perf config: Show default report configuration in example and docs Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 08/19] perf probe: Show trace event definition Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 12/19] perf test vmlinux: Clarify which -v lines are errors or warning Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 13/19] perf test vmlinux: Avoid printing headers for empty lists Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 14/19] perf test vmlinux: Tolerate symbol aliases Arnaldo Carvalho de Melo
2016-09-01 16:45 ` Arnaldo Carvalho de Melo [this message]
2016-09-01 16:45 ` [PATCH 16/19] perf symbols: Fixup symbol sizes before picking best ones Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 17/19] perf probe: Add helper function to check if probe with variable Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 18/19] perf uprobe: Skip prologue if program compiled without optimization Arnaldo Carvalho de Melo
2016-09-01 16:45 ` [PATCH 19/19] perf probe: Move dwarf specific functions to dwarf-aux.c Arnaldo Carvalho de Melo
2016-09-05 13:16 ` [GIT PULL 00/19] perf/core improvements and fixes Ingo Molnar
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=1472748345-23417-16-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=wangnan0@huawei.com \
/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).