perf symbols: Move symsrc prototypes to a separate header
A message that is not in the archive (sent off-list or not yet received): [email protected]
The following commit has been merged into the perf/core branch of tip:
Commit-ID: b1d1b094f7570a13dd7c9b995209baacc8aa6273 Gitweb: https://git.kernel.org/tip/b1d1b094f7570a13dd7c9b995209baacc8aa6273 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 30 Aug 2019 10:26:37 -03:00 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitterDate: Sat, 31 Aug 2019 22:24:05 -03:00
perf symbols: Move symsrc prototypes to a separate header
So that we can remove dso.h from symbol.h and reduce the header dependency tree.
Fixup cases where struct dso guts are needed but were obtained via symbol.h, indirectly.
Cc Adrian Hunter <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/powerpc/util/sym-handling.c | 1 +- tools/perf/builtin-probe.c | 1 +- tools/perf/ui/browsers/map.c | 1 +- tools/perf/ui/gtk/annotate.c | 1 +- tools/perf/util/symbol-elf.c | 1 +- tools/perf/util/symbol-minimal.c | 2 +- tools/perf/util/symbol.c | 1 +- tools/perf/util/symbol.h | 36 +--------------- tools/perf/util/symbol_fprintf.c | 1 +- tools/perf/util/symsrc.h | 46 ++++++++++++++++++++- 10 files changed, 58 insertions(+), 33 deletions(-) create mode 100644 tools/perf/util/symsrc.h
tools/perf/arch/powerpc/util/sym-handling.c +1 -0
@@ -5,6 +5,7 @@*/ #include "debug.h" +#include "dso.h" #include "symbol.h" #include "map.h" #include "probe-event.h"
tools/perf/builtin-probe.c +1 -0
@@ -18,6 +18,7 @@#include "builtin.h" #include "namespaces.h" +#include "util/build-id.h" #include "util/strlist.h" #include "util/strfilter.h" #include "util/symbol.h"
tools/perf/ui/browsers/map.c +1 -0
@@ -8,6 +8,7 @@#include "../../util/util.h" #include "../../util/debug.h" #include "../../util/map.h" +#include "../../util/dso.h" #include "../../util/symbol.h" #include "../browser.h" #include "../helpline.h"
tools/perf/ui/gtk/annotate.c +1 -0
@@ -5,6 +5,7 @@#include "util/annotate.h" #include "util/evsel.h" #include "util/map.h" +#include "util/dso.h" #include "util/symbol.h" #include "ui/helpline.h" #include <inttypes.h>
tools/perf/util/symbol-elf.c +1 -0
@@ -10,6 +10,7 @@#include "map.h" #include "map_groups.h" #include "symbol.h" +#include "symsrc.h" #include "demangle-java.h" #include "demangle-rust.h" #include "machine.h"
tools/perf/util/symbol-minimal.c +2 -0
@@ -1,5 +1,7 @@// SPDX-License-Identifier: GPL-2.0 +#include "dso.h" #include "symbol.h" +#include "symsrc.h" #include "util.h" #include <errno.h>
tools/perf/util/symbol.c +1 -0
@@ -25,6 +25,7 @@#include "machine.h" #include "map.h" #include "symbol.h" +#include "symsrc.h" #include "strlist.h" #include "intlist.h" #include "namespaces.h"
tools/perf/util/symbol.h +3 -33
@@ -20,8 +20,7 @@#endif #include <elf.h> -#include "dso.h" - +struct dso ;struct map ;struct map_groups ;struct option ;
@@ -148,37 +147,6 @@ struct addr_location {s32 socket; }; -struct symsrc { -char *name; -int fd; -enum dso_binary_type type; - -#ifdef HAVE_LIBELF_SUPPORT -Elf *elf; -GElf_Ehdr ehdr; - -Elf_Scn *opdsec; -size_t opdidx; -GElf_Shdr opdshdr; - -Elf_Scn *symtab; -GElf_Shdr symshdr; - -Elf_Scn *dynsym; -size_t dynsym_idx; -GElf_Shdr dynshdr; - -bool adjust_symbols; -bool is_64_bit; -#endif -}; - -void symsrc__destroy (struct symsrc *ss); -int symsrc__init (struct symsrc *ss,struct dso *dso,const char *name, -enum dso_binary_type type); -bool symsrc__has_symtab (struct symsrc *ss); -bool symsrc__possibly_runtime (struct symsrc *ss); -int dso__load (struct dso *dso,struct map *map);int dso__load_vmlinux (struct dso *dso,struct map *map,const char *vmlinux,bool vmlinux_allocated);
@@ -232,6 +200,8 @@ bool symbol__restricted_filename(const char *filename,int symbol__config_symfs (const struct option *opt__maybe_unused ,const char *dir,int unset__maybe_unused ); +struct symsrc ; +int dso__load_sym (struct dso *dso,struct map *map,struct symsrc *syms_ss,struct symsrc *runtime_ss,int kmodule);int dso__synthesize_plt_symbols (struct dso *dso,struct symsrc *ss);
tools/perf/util/symbol_fprintf.c +1 -0
@@ -3,6 +3,7 @@#include <inttypes.h> #include <stdio.h> +#include "dso.h" #include "map.h" #include "symbol.h"
tools/perf/util/symsrc.h new file +46 -0
46 lines not on this page · raw message