Skip to content

Commit 5064424

Browse files
athira-rajeevacmel
authored andcommitted
perf tests vmlinux-kallsyms: Update is_ignored_symbol function to match the kernel ignored list
The testcase “vmlinux-kallsyms.c” fails in powerpc. vmlinux symtab matches kallsyms: FAILED! This test look at the symbols in the vmlinux DSO and check if we find all of them in the kallsyms dso. But from the powerpc logs , observed that the failure happens for: ERR : 0xc0000000000fe9c8: .Lmfspr_table not on kallsyms ERR : 0xc0000000001009c8: .Lmtspr_table not on kallsyms These are labels ( with .L) in the source code and has to be ignored. Reference code with .Lmtspr_table: arch/powerpc/xmon/spr_access.S The testcases invokes is_ignored_symbol() function to ignore hidden symbols in the dso like local symbols. This function is adapted from is_ignored_symbol() kernel function in code: scripts/kallsyms.c . The kernel function got some updates which is not reflected in the testcase function and the new updates also handles ignoring "labels". Below is the changes that went in the kernel function. /* Symbol names that begin with the following are ignored.*/ static const char * const ignored_prefixes[] = { "$", /* local symbols for ARM, MIPS, etc. */ - ".LASANPC", /* s390 kasan local symbols */ + ".L", /* local labels, .LBB,.Ltmpxxx,.L__unnamed_xx,.LASANPC, etc. */ "__crc_", /* modversions */ "__efistub_", /* arm64 EFI stub namespace */ - "__kvm_nvhe_", /* arm64 non-VHE KVM namespace */ + "__kvm_nvhe_$", /* arm64 local symbols in non-VHE KVM namespace */ + "__kvm_nvhe_.L", /* arm64 local symbols in non-VHE KVM namespace */ "__AArch64ADRPThunk_", /* arm64 lld */ "__ARMV5PILongThunk_", /* arm lld */ "__ARMV7PILongThunk_", This change is part of below commits and will handle the symbols with “.L” commit d4c8586 ("kallsyms: ignore all local labels prefixed by '.L'") commit 6ccf9cb ("KVM: arm64: Symbolize the nVHE HYP addresses") Update the testcase function to include the new changes. Reported-by: Disha Goel <[email protected]> Signed-off-by: Athira Jajeev <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kajol Jain <[email protected]> Cc: Madhavan Srinivasan <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Nageswara R Sastry <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent f4a2aad commit 5064424

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/perf/tests/vmlinux-kallsyms.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ static bool is_ignored_symbol(const char *name, char type)
4343
/* Symbol names that begin with the following are ignored.*/
4444
static const char * const ignored_prefixes[] = {
4545
"$", /* local symbols for ARM, MIPS, etc. */
46-
".LASANPC", /* s390 kasan local symbols */
46+
".L", /* local labels, .LBB,.Ltmpxxx,.L__unnamed_xx,.LASANPC, etc. */
4747
"__crc_", /* modversions */
4848
"__efistub_", /* arm64 EFI stub namespace */
49-
"__kvm_nvhe_", /* arm64 non-VHE KVM namespace */
49+
"__kvm_nvhe_$", /* arm64 local symbols in non-VHE KVM namespace */
50+
"__kvm_nvhe_.L", /* arm64 local symbols in non-VHE KVM namespace */
5051
"__AArch64ADRPThunk_", /* arm64 lld */
5152
"__ARMV5PILongThunk_", /* arm lld */
5253
"__ARMV7PILongThunk_",

0 commit comments

Comments
 (0)