Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 456857bd authored by Ingo Molnar's avatar Ingo Molnar Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarIngo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-tip-commits@vger.kernel.org
Link: http://lkml.kernel.org/r/20130912132900.GE23826@gmail.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 33cbbdcc
Loading
Loading
Loading
Loading
+17 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,23 @@
#include <sys/mman.h>
#include <sys/mman.h>
#include <linux/futex.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,
static size_t syscall_arg__scnprintf_hex(char *bf, size_t size,
					 unsigned long arg,
					 unsigned long arg,
					 u8 arg_idx __maybe_unused,
					 u8 arg_idx __maybe_unused,