[PATCH 0/2] Fix mman macros using mman-fix.h

From: Wang Nan
Date: Tue Sep 06 2016 - 01:49:18 EST


Macros in mman like MAP_HUGETLB are missed in some old systems, causes
building error like this:

CC /tmp/build/perf/arch/x86/util/perf_regs.o
util/event.c: In function 'perf_event__synthesize_mmap_events':
util/event.c:350: error: 'MAP_HUGETLB' undeclared (first use in this function)
util/event.c:350: error: (Each undeclared identifier is reported only once
util/event.c:350: error: for each function it appears in.)

The first patch generates mman-fix.h for each arch, the second patch
fixes these macros use mman-fix.h.

Wang Nan (2):
perf tools: Introduce memory mapping macros in mman-fix.h
perf tools: Fix mman macros using mman-fix.h

tools/arch/alpha/include/uapi/asm/mman-fix.h | 38 ++++++++++++++
tools/arch/arm/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/arm64/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/frv/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/h8300/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/hexagon/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/ia64/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/m32r/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/microblaze/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/mips/include/uapi/asm/mman-fix.h | 41 +++++++++++++++
tools/arch/mn10300/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/parisc/include/uapi/asm/mman-fix.h | 38 ++++++++++++++
tools/arch/powerpc/include/uapi/asm/mman-fix.h | 11 ++++
tools/arch/s390/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/score/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/sh/include/uapi/asm/mman-fix.h | 5 ++
tools/arch/sparc/include/uapi/asm/mman-fix.h | 11 ++++
tools/arch/tile/include/uapi/asm/mman-fix.h | 11 ++++
tools/arch/x86/include/uapi/asm/mman-fix.h | 8 +++
tools/arch/xtensa/include/uapi/asm/mman-fix.h | 38 ++++++++++++++
tools/include/uapi/asm-generic/mman-fix.h | 46 +++++++++++++++++
tools/perf/MANIFEST | 2 +
tools/perf/trace/beauty/mmap.c | 63 +----------------------
tools/perf/util/event.c | 5 +-
tools/perf/util/map.c | 3 +-
25 files changed, 307 insertions(+), 68 deletions(-)
create mode 100644 tools/arch/alpha/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/arm/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/arm64/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/frv/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/h8300/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/hexagon/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/ia64/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/m32r/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/microblaze/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/mips/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/mn10300/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/parisc/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/powerpc/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/s390/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/score/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/sh/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/sparc/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/tile/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/x86/include/uapi/asm/mman-fix.h
create mode 100644 tools/arch/xtensa/include/uapi/asm/mman-fix.h
create mode 100644 tools/include/uapi/asm-generic/mman-fix.h

--
1.8.3.4