summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/dso.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2014-04-28 16:43:43 +0200
committerJiri Olsa <jolsa@kernel.org>2014-06-12 16:53:19 +0200
commit53fa8eaa093ad87eb59379de059e76d735a5de45 (patch)
treeb06384fd7d6774a4156f78b105aae20c7c44496b /tools/perf/util/dso.h
parentperf tools: Separate dso data related variables (diff)
downloadlinux-53fa8eaa093ad87eb59379de059e76d735a5de45.tar.xz
linux-53fa8eaa093ad87eb59379de059e76d735a5de45.zip
perf tools: Add data_fd into dso object
Adding data_fd into dso object so we could handle caching of opened dso file data descriptors coming int next patches. Adding dso__data_close interface to keep the data_fd updated when the descriptor is closed. Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jean Pihet <jean.pihet@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1401892622-30848-4-git-send-email-jolsa@kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/util/dso.h')
-rw-r--r--tools/perf/util/dso.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index 7637fdd680b2..e48dcf59b570 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -102,6 +102,7 @@ struct dso {
/* dso data file */
struct {
struct rb_root cache;
+ int fd;
} data;
char name[0];
@@ -147,6 +148,8 @@ int dso__read_binary_type_filename(const struct dso *dso, enum dso_binary_type t
char *root_dir, char *filename, size_t size);
int dso__data_fd(struct dso *dso, struct machine *machine);
+void dso__data_close(struct dso *dso);
+
ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine,
u64 offset, u8 *data, ssize_t size);
ssize_t dso__data_read_addr(struct dso *dso, struct map *map,