aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-07-22 08:14:33 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-07-25 10:32:49 -0400
commit949d160b6962c13fc071afefa22997780fcc94a5 (patch)
tree8a408684bc293bf1b448872afef250684e375d37 /tools/perf/util/symbol.h
parent44f24cb3156a1e7d2b6bb501b7f6153aed08994c (diff)
perf symbols: Add interface to read DSO image data
Adding following interface for DSO object to allow reading of DSO image data: dso__data_fd - opens DSO and returns file descriptor Binary types are used to locate/open DSO in following order: DSO_BINARY_TYPE__BUILD_ID_CACHE DSO_BINARY_TYPE__SYSTEM_PATH_DSO In other word we first try to open DSO build-id path, and if that fails we try to open DSO system path. dso__data_read_offset - reads DSO data from specified offset dso__data_read_addr - reads DSO data from specified address/map. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Arun Sharma <asharma@fb.com> Cc: Benjamin Redelings <benjamin.redelings@nescent.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Frank Ch. Eigler <fche@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Robert Richter <robert.richter@amd.com> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> Cc: Ulrich Drepper <drepper@gmail.com> Link: http://lkml.kernel.org/r/1342959280-5361-11-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r--tools/perf/util/symbol.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index dc474f07bb2d..9b9ea00173af 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -189,6 +189,7 @@ struct dso {
189 enum dso_kernel_type kernel; 189 enum dso_kernel_type kernel;
190 enum dso_swap_type needs_swap; 190 enum dso_swap_type needs_swap;
191 enum dso_binary_type symtab_type; 191 enum dso_binary_type symtab_type;
192 enum dso_binary_type data_type;
192 u8 adjust_symbols:1; 193 u8 adjust_symbols:1;
193 u8 has_build_id:1; 194 u8 has_build_id:1;
194 u8 hit:1; 195 u8 hit:1;
@@ -306,4 +307,11 @@ size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp);
306 307
307int dso__binary_type_file(struct dso *dso, enum dso_binary_type type, 308int dso__binary_type_file(struct dso *dso, enum dso_binary_type type,
308 char *root_dir, char *file, size_t size); 309 char *root_dir, char *file, size_t size);
310
311int dso__data_fd(struct dso *dso, struct machine *machine);
312ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine,
313 u64 offset, u8 *data, ssize_t size);
314ssize_t dso__data_read_addr(struct dso *dso, struct map *map,
315 struct machine *machine, u64 addr,
316 u8 *data, ssize_t size);
309#endif /* __PERF_SYMBOL */ 317#endif /* __PERF_SYMBOL */