perf machine: Move more methods to machine.[ch]
Commit-ID: 69d2591a829132492662bbfe164fcde5e44ad1c4 Gitweb: http://git.kernel.org/tip/69d2591a829132492662bbfe164fcde5e44ad1c4 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 9 Nov 2012 11:32:52 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 9 Nov 2012 11:32:52 -0300
perf machine: Move more methods to machine.[ch]
This time out of map.[ch] mostly, just code move plus a buch of 'self' removal, using machine or machines instead.
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/dso-data.c | 1 + tools/perf/util/dso.c | 1 + tools/perf/util/machine.c | 183 +++++++++++++++++++++++++++++++++++++++ tools/perf/util/machine.h | 131 +++++++++++++++++++++++++++- tools/perf/util/map.c | 179 -------------------------------------- tools/perf/util/map.h | 93 -------------------- tools/perf/util/session.h | 5 +- tools/perf/util/symbol.c | 1 + tools/perf/util/symbol.h | 20 ---- 10 files changed, 318 insertions(+), 297 deletions(-)
tools/perf/tests/builtin-test.c +1 -0
@@ -10,6 +10,7 @@#include "util/debug.h" #include "util/debugfs.h" #include "util/evlist.h" +#include "util/machine.h" #include "util/parse-options.h" #include "util/parse-events.h" #include "util/symbol.h"
tools/perf/tests/dso-data.c +1 -0
@@ -6,6 +6,7 @@#include <fcntl.h> #include <string.h> +#include "machine.h" #include "symbol.h" #define TEST_ASSERT_VAL (text, cond) \
tools/perf/util/dso.c +1 -0
@@ -1,5 +1,6 @@#include "symbol.h" #include "dso.h" +#include "machine.h" #include "util.h" #include "debug.h"
tools/perf/util/machine.c +183 -0
192 lines not on this page · raw message
tools/perf/util/machine.h +130 -1
145 lines not on this page · raw message
tools/perf/util/map.c +0 -179
182 lines not on this page · raw message
tools/perf/util/map.h +0 -93
125 lines not on this page · raw message
tools/perf/util/session.h +1 -4
@@ -4,6 +4,7 @@#include "hist.h" #include "event.h" #include "header.h" +#include "machine.h" #include "symbol.h" #include "thread.h" #include <linux/rbtree.h>
@@ -68,10 +69,6 @@ int perf_session__resolve_callchain(struct perf_session *self, struct perf_evselstruct ip_callchain *chain, struct symbol **parent); -struct branch_info *machine__resolve_bstack (struct machine *self, -struct thread *thread, -struct branch_stack *bs); -bool perf_session__has_traces (struct perf_session *self,const char *msg);void mem_bswap_64 (void *src,int byte_size);
tools/perf/util/symbol.c +1 -0
@@ -12,6 +12,7 @@#include "build-id.h" #include "util.h" #include "debug.h" +#include "machine.h" #include "symbol.h" #include "strlist.h"
tools/perf/util/symbol.h +0 -20
@@ -200,16 +200,6 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map, symbol_filter_t filter);int dso__load_kallsyms (struct dso *dso,const char *filename,struct map *map,symbol_filter_t filter); -int machine__load_kallsyms (struct machine *machine,const char *filename, -enum map_type type,symbol_filter_t filter); -int machine__load_vmlinux_path (struct machine *machine,enum map_type type, -symbol_filter_t filter); - -size_t machine__fprintf_dsos_buildid (struct machine *machine, -FILE *fp,bool with_hits); -size_t machines__fprintf_dsos (struct rb_root *machines,FILE *fp); -size_t machines__fprintf_dsos_buildid (struct rb_root *machines, -FILE *fp,bool with_hits);struct symbol *dso__find_symbol (struct dso *dso,enum map_type type,u64 addr);
@@ -224,14 +214,6 @@ int kallsyms__parse(const char *filename, void *arg,int filename__read_debuglink (const char *filename,char *debuglink,size_t size); -void machine__destroy_kernel_maps (struct machine *machine); -int __machine__create_kernel_maps (struct machine *machine,struct dso *kernel); -int machine__create_kernel_maps (struct machine *machine); - -int machines__create_kernel_maps (struct rb_root *machines,pid_t pid); -int machines__create_guest_kernel_maps (struct rb_root *machines); -void machines__destroy_guest_kernel_maps (struct rb_root *machines); -int symbol__init (void );void symbol__exit (void );void symbol__elf_init (void );
@@ -242,8 +224,6 @@ size_t symbol__fprintf_symname(const struct symbol *sym, FILE *fp);size_t symbol__fprintf (struct symbol *sym,FILE *fp);bool symbol_type__is_a (char symbol_type,enum map_type map_type); -size_t machine__fprintf_vmlinux_path (struct machine *machine,FILE *fp); -int dso__test_data (void ); int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, struct symsrc *runtime_ss, symbol_filter_t filter,