diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-11-04 05:54:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-04 05:59:45 -0500 |
commit | a2e71271535fde493c32803b1f34789f97efcb5e (patch) | |
tree | 90d7139bea2f49e947f27af92614fa6eca50b64d /tools/perf/util | |
parent | 6d7aa9d721c8c640066142fd9534afcdf68d7f9d (diff) | |
parent | b419148e567728f6af0c3b01965c1cc141e3e13a (diff) |
Merge commit 'v2.6.32-rc6' into perf/core
Conflicts:
tools/perf/Makefile
Merge reason: Resolve the conflict, merge to upstream and merge in
perf fixes so we can add a dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/symbol.c | 6 | ||||
-rw-r--r-- | tools/perf/util/symbol.h | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 93c49f4685f..ac94d7b94f6 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -549,7 +549,7 @@ static int dso__synthesize_plt_symbols(struct dso *self) | |||
549 | if (fd < 0) | 549 | if (fd < 0) |
550 | goto out; | 550 | goto out; |
551 | 551 | ||
552 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 552 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
553 | if (elf == NULL) | 553 | if (elf == NULL) |
554 | goto out_close; | 554 | goto out_close; |
555 | 555 | ||
@@ -673,7 +673,7 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name, | |||
673 | Elf *elf; | 673 | Elf *elf; |
674 | int nr = 0; | 674 | int nr = 0; |
675 | 675 | ||
676 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 676 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
677 | if (elf == NULL) { | 677 | if (elf == NULL) { |
678 | pr_err("%s: cannot read %s ELF file.\n", __func__, name); | 678 | pr_err("%s: cannot read %s ELF file.\n", __func__, name); |
679 | goto out_close; | 679 | goto out_close; |
@@ -842,7 +842,7 @@ static char *dso__read_build_id(struct dso *self) | |||
842 | if (fd < 0) | 842 | if (fd < 0) |
843 | goto out; | 843 | goto out; |
844 | 844 | ||
845 | elf = elf_begin(fd, ELF_C_READ_MMAP, NULL); | 845 | elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL); |
846 | if (elf == NULL) { | 846 | if (elf == NULL) { |
847 | pr_err("%s: cannot read %s ELF file.\n", __func__, | 847 | pr_err("%s: cannot read %s ELF file.\n", __func__, |
848 | self->long_name); | 848 | self->long_name); |
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index a471a384073..088433062dd 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -27,6 +27,16 @@ static inline char *bfd_demangle(void __used *v, const char __used *c, | |||
27 | #endif | 27 | #endif |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | /* | ||
31 | * libelf 0.8.x and earlier do not support ELF_C_READ_MMAP; | ||
32 | * for newer versions we can use mmap to reduce memory usage: | ||
33 | */ | ||
34 | #ifdef LIBELF_NO_MMAP | ||
35 | # define PERF_ELF_C_READ_MMAP ELF_C_READ | ||
36 | #else | ||
37 | # define PERF_ELF_C_READ_MMAP ELF_C_READ_MMAP | ||
38 | #endif | ||
39 | |||
30 | #ifndef DMGL_PARAMS | 40 | #ifndef DMGL_PARAMS |
31 | #define DMGL_PARAMS (1 << 0) /* Include function args */ | 41 | #define DMGL_PARAMS (1 << 0) /* Include function args */ |
32 | #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ | 42 | #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ |