perf: update to new syscall stub naming convention
PATCH 1/1 perf: update to new syscall stub naming convention
For v4.17-rc1, the naming of syscall stubs changed. Update the perf scripts/utils/tests which need to be aware of the syscall stub naming accordingly.
Signed-off-by Dominik Brodowski <[email protected]>
tools/perf/arch/powerpc/util/sym-handling.c +3 -3
@@ -32,10 +32,10 @@ int arch__choose_best_symbol(struct symbol *syma,if (*sym =='.' ) sym++; -/* Avoid "SyS" kernel syscall aliases */ -if (strlen (sym) >=3 && !strncmp (sym,"SyS" ,3 )) +/* Avoid "__se_sys" kernel syscall aliases */ +if (strlen (sym) >=8 && !strncmp (sym,"__se_sys" ,8 ))return SYMBOL_B ; -if (strlen (sym) >=10 && !strncmp (sym,"compat_SyS" ,10 )) +if (strlen (sym) >=15 && !strncmp (sym,"__se_compat_sys" ,15 ))return SYMBOL_B ;return SYMBOL_A ;
tools/perf/tests/bpf-script-example.c +2 -2
@@ -31,8 +31,8 @@ struct bpf_map_def SEC("maps") flip_table = { .max_entries = 1, }; -SEC("func=SyS_epoll_pwait") -int bpf_func__SyS_epoll_pwait (void *ctx) +SEC("func=__se_sys_epoll_pwait") +int bpf_func____se_sys_epoll_pwait (void *ctx) {int ind =0 ;int *flag =bpf_map_lookup_elem (&flip_table, &ind);
tools/perf/util/c++/clang-test.cpp +1 -1
@@ -41,7 +41,7 @@ int test__clang_to_IR(void) if (!M) return -1; for (llvm::Function& F : *M) - if (F.getName() == "bpf_func__SyS_epoll_pwait") + if (F.getName() == "bpf_func____se_sys_epoll_pwait") return 0; return -1; }
tools/perf/util/symbol.c +4 -3
@@ -113,10 +113,11 @@ int __weak arch__compare_symbol_names_n(const char *namea, const char *nameb,int __weak arch__choose_best_symbol (struct symbol *syma,struct symbol *symb__maybe_unused ) { -/* Avoid "SyS" kernel syscall aliases */ -if (strlen (syma->name) >=3 && !strncmp (syma->name,"SyS" ,3 )) +/* Avoid "__se_sys" kernel syscall aliases */ +if (strlen (syma->name) >=8 && !strncmp (syma->name,"__se_sys" ,8 ))return SYMBOL_B ; -if (strlen (syma->name) >=10 && !strncmp (syma->name,"compat_SyS" ,10 )) +if (strlen (syma->name) >=15 && + !strncmp (syma->name,"__se_compat_sys" ,15 ))return SYMBOL_B ;return SYMBOL_A ;