linux-stable/tools
Arnaldo Carvalho de Melo 492e05b065 tools: Update asm-generic/mman-common.h copy from the kernel
To get the defines introduced in the commit aafd4562df ("mm: arch:
consolidate mmap hugetlb size encodings"), that doesn't brings anything
interesting for tools/, but also the ones from d2cd9ede6e ("mm,fork:
introduce MADV_WIPEONFORK"), which does, and ends up triggering an auto-update
to the tools/perf/trace/beauty/generated/madvise_behavior_array.c file,
supporting the newly introduced 'behavior' values.

This silences this perf build warning:

  Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h'

Testing it:

  # cat madvise.c
  #include <sys/mman.h>
  #include <stdlib.h>

  #ifndef MADV_WIPEONFORK
  #define MADV_WIPEONFORK 18
  #endif
  #ifndef MADV_KEEPONFORK
  #define MADV_KEEPONFORK 19
  #endif

  int main(void)
  {
        void *ptr = mmap(NULL, 4096, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);

        madvise(ptr, 4096, MADV_WIPEONFORK);
        madvise(ptr, 4096, MADV_KEEPONFORK);

	return 0;
  }
  [root@jouet c]# perf trace -e mmap,madvise ./madvise
     0.000 ( 0.013 ms): madvise/11732 mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS            ) = 0x7fba6e015000
     0.047 ( 0.004 ms): madvise/11732 mmap(len: 160164, prot: READ, flags: PRIVATE, fd: 3                   ) = 0x7fba6dfed000
     0.084 ( 0.009 ms): madvise/11732 mmap(len: 4000096, prot: EXEC|READ, flags: PRIVATE|DENYWRITE, fd: 3   ) = 0x7fba6da20000
     0.109 ( 0.006 ms): madvise/11732 mmap(addr: 0x7fba6dde7000, len: 24576, prot: READ|WRITE, flags: PRIVATE|DENYWRITE|FIXED, fd: 3, off: 1863680) = 0x7fba6dde7000
     0.125 ( 0.004 ms): madvise/11732 mmap(addr: 0x7fba6dded000, len: 14688, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS|FIXED) = 0x7fba6dded000
     0.150 ( 0.006 ms): madvise/11732 mmap(len: 12288, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS           ) = 0x7fba6dfea000
     0.288 ( 0.003 ms): madvise/11732 mmap(len: 4096, flags: PRIVATE|ANONYMOUS                              ) = 0x7fba6e014000
     0.292 ( 0.002 ms): madvise/11732 madvise(start: 0x7fba6e014000, len_in: 4096, behavior: MADV_WIPEONFORK) = 0
     0.295 ( 0.001 ms): madvise/11732 madvise(start: 0x7fba6e014000, len_in: 4096, behavior: MADV_KEEPONFORK) = 0
  # uname -a
  Linux jouet 4.13.0+ #2 SMP Mon Sep 18 17:22:46 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
  #

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-yev9rexu02cl7cjeozzmrl9t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-09-21 13:12:59 -03:00
..
accounting
arch Merge branch 'parisc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2017-09-05 09:37:11 -07:00
build tools build tests: Don't hardcode gcc name 2017-08-28 16:44:44 -03:00
cgroup
firewire
gpio
hv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-09-06 14:45:08 -07:00
iio iio: tools: add install section 2017-08-09 14:31:58 +01:00
include tools: Update asm-generic/mman-common.h copy from the kernel 2017-09-21 13:12:59 -03:00
kvm/kvm_stat tools/kvm_stat: add '-f help' to get the available event list 2017-07-26 19:04:53 +02:00
laptop
leds
lib perf/urgent fixes: 2017-09-13 09:25:10 +02:00
net
nfsd
objtool objtool: Handle GCC stack pointer adjustment bug 2017-08-30 10:48:41 +02:00
pci tools: PCI: Add a missing option help line 2017-08-29 16:03:34 -05:00
pcmcia
perf perf trace beauty madvise: Generate 'behavior' string table from kernel headers 2017-09-21 13:12:59 -03:00
power ACPI updates for v4.14-rc1 2017-09-05 12:45:03 -07:00
scripts perf tools: Robustify detection of clang binary 2017-08-28 16:44:46 -03:00
spi spi: tools: add install section 2017-07-26 12:25:28 +01:00
testing Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
thermal/tmon
time
usb usbip: auto retry for concurrent attach 2017-08-31 18:08:45 +02:00
virtio
vm
Makefile spi: Updates for v4.14 2017-09-05 11:40:38 -07:00