perf tools: Allow generating per-arch syscall table arrays
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 4 Apr 2016 20:52:18 +0000 (17:52 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 8 Apr 2016 12:58:14 +0000 (09:58 -0300)
commit5af56fab2b11769e35ce96613d321bcc0f7b84c1
treef49152e486b9fad3bf5f6165df0f6e4ad38b4341
parentfd0db10268b3729eb466fd726a39ce7d800bb150
perf tools: Allow generating per-arch syscall table arrays

Tools should use a mechanism similar to arch/x86/entry/syscalls/ to
generate a header file with the definitions for two variables:

  static const char *syscalltbl_x86_64[] = {
[0] = "read",
[1] = "write",
  <SNIP>
[324] = "membarrier",
[325] = "mlock2",
[326] = "copy_file_range",
  };
  static const int syscalltbl_x86_64_max_id = 326;

In a per arch file that should then be included in
tools/perf/util/syscalltbl.c.

First one will be for x86_64.

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: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-02uuamkxgccczdth8komspgp@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/syscalltbl.c
tools/perf/util/syscalltbl.h