linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:perf/core] perf test vmlinux: Tolerate symbol aliases
@ 2016-09-05 13:25 tip-bot for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2016-09-05 13:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: jolsa, acme, mingo, mhiramat, tglx, namhyung, hpa, linux-kernel,
	wangnan0, adrian.hunter, dsahern

Commit-ID:  7e1b659545b37ed629ee43d4daf72a02dc06e195
Gitweb:     http://git.kernel.org/tip/7e1b659545b37ed629ee43d4daf72a02dc06e195
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Thu, 1 Sep 2016 10:40:57 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 1 Sep 2016 12:42:23 -0300

perf test vmlinux: Tolerate symbol aliases

The algorithms used to prune aliases in symbols__fixup_duplicate() uses
information available on ELF symtabs that are not present on
/proc/kallsyms, so it picks different aliases as "best" for vmlinux and
kallsyms.

We could probably improve a bit this by having a list of aliases for the
"best" symbols picked, instead of throwing this info, but that is left
for when we find a real need.

With this, 'perf test vmlinux' passes:

  # perf test -F 1
   1: vmlinux symtab matches kallsyms: Ok
  #

When we ask for verbose mode, we can see those warning:

  # perf test -F -v 1
   1: vmlinux symtab matches kallsyms:
  --- start ---
  Looking at the vmlinux_path (8 entries long)
  Using /lib/modules/4.8.0-rc4+/build/vmlinux for symbols
  WARN: 0xffffffffb7001000: diff name v: xen_hypercall_set_trap_table k: hypercall_page
  WARN: 0xffffffffb7077970: diff end addr for aesni_gcm_dec v: 0xffffffffb707a2f2 k: 0xffffffffb7077a02
  WARN: 0xffffffffb707a300: diff end addr for aesni_gcm_enc v: 0xffffffffb707cc03 k: 0xffffffffb707a392
  WARN: 0xffffffffb707f950: diff end addr for aesni_gcm_enc_avx_gen2 v: 0xffffffffb7084ef6 k: 0xffffffffb707f9c3
  WARN: 0xffffffffb7084f00: diff end addr for aesni_gcm_dec_avx_gen2 v: 0xffffffffb708a691 k: 0xffffffffb7084f73
  WARN: 0xffffffffb708aa10: diff end addr for aesni_gcm_enc_avx_gen4 v: 0xffffffffb708f844 k: 0xffffffffb708aa83
  WARN: 0xffffffffb708f850: diff end addr for aesni_gcm_dec_avx_gen4 v: 0xffffffffb709486f k: 0xffffffffb708f8c3
  WARN: 0xffffffffb71a6e50: diff name v: perf_pmu_commit_txn.part.98 k: perf_pmu_cancel_txn.part.97
  WARN: 0xffffffffb752e480: diff name v: wakeup_expire_count_show.part.5 k: wakeup_active_count_show.part.7
  WARN: 0xffffffffb76e8d00: diff name v: phys_switch_id_show.part.11 k: phys_port_name_show.part.12
  WARN: Maps only in vmlinux:
   ffffffffb7d7d000-ffffffffb7eeaac8 117d000 [kernel].init.text
   ffffffffb7eeaac8-ffffffffc03ad000 12eaac8 [kernel].exit.text
  ---- end ----
  vmlinux symtab matches kallsyms: Ok
  #

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>
Link: http://lkml.kernel.org/n/tip-6v5w1k8rpx4ggczlkw730vt0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/vmlinux-kallsyms.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
index 450f699..77513bf 100644
--- a/tools/perf/tests/vmlinux-kallsyms.c
+++ b/tools/perf/tests/vmlinux-kallsyms.c
@@ -155,19 +155,20 @@ next_pair:
 				 * kallsyms.
 				 */
 				continue;
-
 			} else {
 				pair = machine__find_kernel_symbol_by_name(&kallsyms, type, sym->name, NULL, NULL);
 				if (pair) {
 					if (UM(pair->start) == mem_start)
 						goto next_pair;
 
-					pr_debug("ERR : %#" PRIx64 ": diff name v: %s k: %s\n",
+					pr_debug("WARN: %#" PRIx64 ": diff name v: %s k: %s\n",
 						 mem_start, sym->name, pair->name);
 				} else {
-					pr_debug("ERR : %#" PRIx64 ": diff name v: %s k: %s\n",
+					pr_debug("WARN: %#" PRIx64 ": diff name v: %s k: %s\n",
 						 mem_start, sym->name, first_pair->name);
 				}
+
+				continue;
 			}
 		} else
 			pr_debug("ERR : %#" PRIx64 ": %s not on kallsyms\n",

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-05 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 13:25 [tip:perf/core] perf test vmlinux: Tolerate symbol aliases tip-bot for Arnaldo Carvalho de Melo

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).