aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <[email protected]>2013-09-12 15:29:00 +0200
committerArnaldo Carvalho de Melo <[email protected]>2013-09-19 11:32:17 -0300
commit456857bded19a4160bbe083bae926e23f483b7f7 (patch)
tree5db8e5e958c4dfe33be609303cd4e6bf28c00d1c
parent33cbbdccf39f6d7e01c282c4320d818a75b67d54 (diff)
perf tools: Fill in new definitions for madvise()/mmap() flags
builtin-trace.c started using various new syscall features not defined in the header files of older distros - resulting in build failures. Fill in the (ABI) constants if they are not defined. (There might be a better place to put this than builtin-trace.c, into a compat header or so.) Signed-off-by: Ingo Molnar <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/builtin-trace.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index f5aa6375e3e9..fd4853404727 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -16,6 +16,23 @@
#include <sys/mman.h>
#include <linux/futex.h>
+/* For older distros: */
+#ifndef MAP_STACK
+# define MAP_STACK 0x20000
+#endif
+
+#ifndef MADV_HWPOISON
+# define MADV_HWPOISON 100
+#endif
+
+#ifndef MADV_MERGEABLE
+# define MADV_MERGEABLE 12
+#endif
+
+#ifndef MADV_UNMERGEABLE
+# define MADV_UNMERGEABLE 13
+#endif
+
static size_t syscall_arg__scnprintf_hex(char *bf, size_t size,
unsigned long arg,
u8 arg_idx __maybe_unused,