perf symbols: Remove symbol_filter_t machinery

We're not using it anymore, few users were, but we really could do
without it, simplify lots of functions by removing it.

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-1zng8wdznn00iiz08bb7q3vn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo
2016-09-01 19:25:52 -03:00
parent c79c809197
commit be39db9f29
21 changed files with 141 additions and 202 deletions

View File

@ -254,8 +254,7 @@ static char *demangle_sym(struct dso *dso, int kmodule, const char *elf_name)
* And always look at the original dso, not at debuginfo packages, that
* have the PLT data stripped out (shdr_rel_plt.sh_type == SHT_NOBITS).
*/
int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss, struct map *map,
symbol_filter_t filter)
int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss, struct map *map)
{
uint32_t nr_rel_entries, idx;
GElf_Sym sym;
@ -351,12 +350,8 @@ int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss, struct map *
if (!f)
goto out_elf_end;
if (filter && filter(map, f))
symbol__delete(f);
else {
symbols__insert(&dso->symbols[map->type], f);
++nr;
}
symbols__insert(&dso->symbols[map->type], f);
++nr;
}
} else if (shdr_rel_plt.sh_type == SHT_REL) {
GElf_Rel pos_mem, *pos;
@ -381,12 +376,8 @@ int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss, struct map *
if (!f)
goto out_elf_end;
if (filter && filter(map, f))
symbol__delete(f);
else {
symbols__insert(&dso->symbols[map->type], f);
++nr;
}
symbols__insert(&dso->symbols[map->type], f);
++nr;
}
}
@ -825,9 +816,8 @@ static u64 ref_reloc(struct kmap *kmap)
void __weak arch__sym_update(struct symbol *s __maybe_unused,
GElf_Sym *sym __maybe_unused) { }
int dso__load_sym(struct dso *dso, struct map *map,
struct symsrc *syms_ss, struct symsrc *runtime_ss,
symbol_filter_t filter, int kmodule)
int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
struct symsrc *runtime_ss, int kmodule)
{
struct kmap *kmap = dso->kernel ? map__kmap(map) : NULL;
struct map_groups *kmaps = kmap ? map__kmaps(map) : NULL;
@ -1124,12 +1114,8 @@ new_symbol:
arch__sym_update(f, &sym);
if (filter && filter(curr_map, f))
symbol__delete(f);
else {
__symbols__insert(&curr_dso->symbols[curr_map->type], f, dso->kernel);
nr++;
}
__symbols__insert(&curr_dso->symbols[curr_map->type], f, dso->kernel);
nr++;
}
/*