aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-01-13 10:22:17 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-13 11:39:43 -0500
commitb7cece76783c68fb391f9882235b4b0c9c300c46 (patch)
tree8a0224493acc3cf74c218384a3b76b3e47c131a2 /tools/perf/util/symbol.h
parentff314d3903c2843de65c2148f66f277f2440ed26 (diff)
perf tools: Encode kernel module mappings in perf.data
We were always looking at the running machine /proc/modules, even when processing a perf.data file, which only makes sense when we're doing 'perf record' and 'perf report' on the same machine, and in close sucession, or if we don't use modules at all, right Peter? ;-) Now, at 'perf record' time we read /proc/modules, find the long path for modules, and put them as PERF_MMAP events, just like we did to encode the reloc reference symbol for vmlinux. Talking about that now it is encoded in .pgoff, so that we can use .{start,len} to store the address boundaries for the kernel so that when we reconstruct the kmaps tree we can do lookups right away, without having to fixup the end of the kernel maps like we did in the past (and now only in perf record). One more step in the 'perf archive' direction when we'll finally be able to collect data in one machine and analyse in another. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1263396139-4798-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r--tools/perf/util/symbol.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index ee0b4593db7b..594156e43b10 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -134,6 +134,7 @@ size_t dsos__fprintf_buildid(FILE *fp);
134size_t dso__fprintf_buildid(struct dso *self, FILE *fp); 134size_t dso__fprintf_buildid(struct dso *self, FILE *fp);
135size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp); 135size_t dso__fprintf(struct dso *self, enum map_type type, FILE *fp);
136char dso__symtab_origin(const struct dso *self); 136char dso__symtab_origin(const struct dso *self);
137void dso__set_long_name(struct dso *self, char *name);
137void dso__set_build_id(struct dso *self, void *build_id); 138void dso__set_build_id(struct dso *self, void *build_id);
138struct symbol *dso__find_symbol(struct dso *self, enum map_type type, u64 addr); 139struct symbol *dso__find_symbol(struct dso *self, enum map_type type, u64 addr);
139struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type, 140struct symbol *dso__find_symbol_by_name(struct dso *self, enum map_type type,
@@ -151,5 +152,7 @@ bool symbol_type__is_a(char symbol_type, enum map_type map_type);
151 152
152int perf_session__create_kernel_maps(struct perf_session *self); 153int perf_session__create_kernel_maps(struct perf_session *self);
153 154
155struct map *perf_session__new_module_map(struct perf_session *self, u64 start,
156 const char *filename);
154extern struct dso *vdso; 157extern struct dso *vdso;
155#endif /* __PERF_SYMBOL */ 158#endif /* __PERF_SYMBOL */