diff options
author | Jiri Olsa <jolsa@kernel.org> | 2014-04-28 16:43:43 +0200 |
---|---|---|
committer | Jiri Olsa <jolsa@kernel.org> | 2014-06-12 16:53:19 +0200 |
commit | 53fa8eaa093ad87eb59379de059e76d735a5de45 (patch) | |
tree | b06384fd7d6774a4156f78b105aae20c7c44496b /tools/perf/util/unwind-libunwind.c | |
parent | perf tools: Separate dso data related variables (diff) | |
download | linux-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/unwind-libunwind.c')
-rw-r--r-- | tools/perf/util/unwind-libunwind.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c index bd5768d74f01..4f8dd9ee3899 100644 --- a/tools/perf/util/unwind-libunwind.c +++ b/tools/perf/util/unwind-libunwind.c @@ -250,7 +250,7 @@ static int read_unwind_spec_eh_frame(struct dso *dso, struct machine *machine, /* Check the .eh_frame section for unwinding info */ offset = elf_section_offset(fd, ".eh_frame_hdr"); - close(fd); + dso__data_close(dso); if (offset) ret = unwind_spec_ehframe(dso, machine, offset, @@ -271,7 +271,7 @@ static int read_unwind_spec_debug_frame(struct dso *dso, /* Check the .debug_frame section for unwinding info */ *offset = elf_section_offset(fd, ".debug_frame"); - close(fd); + dso__data_close(dso); if (*offset) return 0; |