[tip:perf/urgent] perf test vmlinux-kallsyms: Ignore aliases to _etext when searching on kallsyms
From: tip-bot for Arnaldo Carvalho de Melo
Date: Tue May 28 2019 - 17:33:44 EST
Commit-ID: 93f678b9ae8feb7f7cec29c2dcbb5756ad22d9a1
Gitweb: https://git.kernel.org/tip/93f678b9ae8feb7f7cec29c2dcbb5756ad22d9a1
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
AuthorDate: Fri, 24 May 2019 15:39:00 -0300
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 28 May 2019 09:52:23 -0300
perf test vmlinux-kallsyms: Ignore aliases to _etext when searching on kallsyms
No need to search for aliases for the symbol that marks the end of the
kernel text segment, the following patch will make such symbols not to
be found when searching in the kallsyms maps causing this test to fail.
So as a prep patch to avoid breaking bisection, ignore such symbols.
Tested-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Song Liu <songliubraving@xxxxxx>
Cc: Stanislav Fomichev <sdf@xxxxxxxxxx>
Cc: Thomas Richter <tmricht@xxxxxxxxxxxxx>
Link: https://lkml.kernel.org/n/tip-qfwuih8cvmk9doh7k5k244eq@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/tests/vmlinux-kallsyms.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
index 7691980b7df1..f101576d1c72 100644
--- a/tools/perf/tests/vmlinux-kallsyms.c
+++ b/tools/perf/tests/vmlinux-kallsyms.c
@@ -161,9 +161,16 @@ next_pair:
continue;
}
- } else
+ } else if (mem_start == kallsyms.vmlinux_map->end) {
+ /*
+ * Ignore aliases to _etext, i.e. to the end of the kernel text area,
+ * such as __indirect_thunk_end.
+ */
+ continue;
+ } else {
pr_debug("ERR : %#" PRIx64 ": %s not on kallsyms\n",
mem_start, sym->name);
+ }
err = -1;
}