perf util: Introduce architecture specific errno/name mapping
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Fri, 19 Jan 2018 08:56:15 +0000 (09:56 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 23 Jan 2018 12:51:37 +0000 (09:51 -0300)
commit0337cf74ccf2a43437bff2e23b278e4f2dc4c6e2
tree8dda4b8e36a86d64c562a2698539778812caa5c7
parent28b8f954003e59dbf0b56be6df0d81f83e64f36b
perf util: Introduce architecture specific errno/name mapping

Introduce a script that generates a mapping of errno numbers to their
names for each architecture that is supported by perf (i.e.  has a
subdirectory in tools/perf/arch/).

The errno mapping is generated as part of the trace beautifiers and can
be used by including the trace/beauty/arch_errno_names.c file.  Then,
use arch_syscalls__strerrno() to look up an errno value to obtain the
errno name (e.g. ENOENT) for a particular architecture.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: linux-s390@vger.kernel.org
LPU-Reference: 1516352177-11106-4-git-send-email-brueckner@linux.vnet.ibm.com
Link: https://lkml.kernel.org/n/tip-8zlsjnuoep2ww39aq5z41fno@git.kernel.org
[ Make x86 be the first arch, most common, add newline to last line, fixing build on centos:5 ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile.perf
tools/perf/trace/beauty/arch_errno_names.c [new file with mode: 0644]
tools/perf/trace/beauty/arch_errno_names.sh [new file with mode: 0755]
tools/perf/trace/beauty/beauty.h