perf script: Consolidate capstone print functions
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 1 Apr 2024 21:08:05 +0000 (14:08 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 8 Apr 2024 20:42:27 +0000 (17:42 -0300)
commit218c200f677d8af46a8540319e4d26c52b3277a5
treeff4831128d2c1097937eba89ad480b9ac6b53ff4
parentd812044688dfe73e1b309689d58d06f50a15e618
perf script: Consolidate capstone print functions

Consolidate capstone print functions, to reduce duplication. Amend call
sites to use a file pointer for output, which is consistent with most
perf tools print functions. Add print_opts with an option to print also
the hex value of a resolved symbol+offset.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20240401210925.209671-4-ak@linux.intel.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
[ Added missing inttypes.h include to use PRIx64 in util/print_insn.c ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c
tools/perf/util/print_insn.c
tools/perf/util/print_insn.h