perf trace: Move syscall table id <-> name routines to separate class
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 4 Apr 2016 16:32:20 +0000 (13:32 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 8 Apr 2016 12:58:13 +0000 (09:58 -0300)
commitfd0db10268b3729eb466fd726a39ce7d800bb150
tree1c677258cc647bf919e4c58e5cb87b0d080b1fef
parentba2f22cf9989561c08225f0e88078d5562832313
perf trace: Move syscall table id <-> name routines to separate class

We're using libaudit for doing name to id and id to syscall name
translations, but that makes 'perf trace' to have to wait for newer
libaudit versions supporting recently added syscalls, such as
"userfaultfd" at the time of this changeset.

We have all the information right there, in the kernel sources, so move
this code to a separate place, wrapped behind functions that will
progressively use the kernel source files to extract the syscall table
for use in 'perf trace'.

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-i38opd09ow25mmyrvfwnbvkj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c
tools/perf/util/Build
tools/perf/util/syscalltbl.c [new file with mode: 0644]
tools/perf/util/syscalltbl.h [new file with mode: 0644]