perf intel-pt: Use shared x86 insn decoder
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 29 Aug 2019 22:41:21 +0000 (17:41 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 1 Sep 2019 01:27:52 +0000 (22:27 -0300)
commit00a263902ac3da886cf275663a938f503a853f68
tree76637a01267fb591acab4aaa1918f899277b3687
parentf1da0a6c136542b9571b30af27bc1e84254f7a47
perf intel-pt: Use shared x86 insn decoder

Now that there's a common version of the decoder for all tools, use it
instead of the local copy.

Also use perf's check-headers.sh script to diff the decoder files to
make sure they remain in sync with the kernel version.  Objtool has a
similar check.

Committer notes:

Had to keep this all pointing explicitely to x86 headers/files, i.e.
instead of asm/isnn.h we had to use ../include/asm/insn.h when the files
were in differemt dirs, or just replace "<asm/foo.h>" with "foo.h".

This way we continue to be able to process perf.data files with Intel PT
traces in distros other than x86.

Also fixed up the awk script paths to use $(srcdir)/tools/arch instead
or relative directories so that we keep detached tarballs (make help |
grep perf) working.

For now the include lines in these headers are being ignored so as not
to flag false reports of kernel/tools out of sync.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: x86@kernel.org
Link: http://lore.kernel.org/lkml/8a37e615d2880f039505d693d1e068a009358a2b.1567118001.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
16 files changed:
tools/arch/x86/include/asm/inat.h
tools/arch/x86/include/asm/insn.h
tools/arch/x86/lib/inat.c
tools/arch/x86/lib/insn.c
tools/perf/arch/x86/tests/insn-x86.c
tools/perf/arch/x86/util/archinsn.c
tools/perf/check-headers.sh
tools/perf/util/intel-pt-decoder/Build
tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk [deleted file]
tools/perf/util/intel-pt-decoder/inat.c [deleted file]
tools/perf/util/intel-pt-decoder/inat.h [deleted file]
tools/perf/util/intel-pt-decoder/inat_types.h [deleted file]
tools/perf/util/intel-pt-decoder/insn.c [deleted file]
tools/perf/util/intel-pt-decoder/insn.h [deleted file]
tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
tools/perf/util/intel-pt-decoder/x86-opcode-map.txt [deleted file]