]> asedeno.scripts.mit.edu Git - linux.git/commit
perf trace beauty madvise: Generate 'behavior' string table from kernel headers
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 20 Sep 2017 15:30:36 +0000 (12:30 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 21 Sep 2017 16:12:59 +0000 (13:12 -0300)
commit5a54c2f5e1717264f6e24687f703937eaca5f55d
treed2ccb0cfe887fed76fe31b3c4736c7baf4998166
parent5c9295bfe6f5f59f3f2eee78f58b0523d117897e
perf trace beauty madvise: Generate 'behavior' string table from kernel headers

This is one more case where the way that syscall parameter values are
defined in kernel headers are easy to parse using a shell script that
will then generate the string table that gets used by the madvise
'behaviour' argument beautifier.

This way as soon as the header syncronization mechanism in perf's build
system detects a change in a copy of a kernel ABI header and that file
is syncronized, we get 'perf trace' updated automagically.

So, when we syncronize this:

  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'

We'll get these:

  #define MADV_WIPEONFORK 18              /* Zero memory on fork, child only */
  #define MADV_KEEPONFORK 19              /* Undo MADV_WIPEONFORK */

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
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-dolb0ghds4ui7wc1npgkchvc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile.perf
tools/perf/trace/beauty/madvise_behavior.sh [new file with mode: 0755]
tools/perf/trace/beauty/mmap.c