diff options
author | Marti Raudsepp <marti@juffo.org> | 2009-10-24 12:10:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-25 12:09:14 -0400 |
commit | 84087126d50400789b44459cfc45721778e6ebb0 (patch) | |
tree | 66d0b412094f255fbb53a6f122491c9974e9478f /tools/perf/util/symbol.h | |
parent | 54f4407608c59712a8f5ec1e10dfac40bef5a2e7 (diff) |
perf tools: Fix compatibility with libelf 0.8 and autodetect
The Makefile now automatically defines LIBELF_NO_MMAP when
libelf 0.8.x is detected. libelf 0.8 is still maintained and
some distributions such as Arch Linux use it instead of
elfutils.
Signed-off-by: Marti Raudsepp <marti@juffo.org>
Cc: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1256400636.3007.16.camel@newn>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r-- | tools/perf/util/symbol.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 6e8490716408..829da9edba64 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 */ |