perf annotate: Split out util/disasm.c
authorNamhyung Kim <namhyung@kernel.org>
Fri, 29 Mar 2024 21:58:10 +0000 (14:58 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 3 Apr 2024 14:48:57 +0000 (11:48 -0300)
commit98f69a573c668a18cfda41b3976118e04521a196
treeb4bd68a7eaecf2a677bd0d64fa3fd46b1614ebce
parent10adbf777622e22323abbf9f7861c26deb373199
perf annotate: Split out util/disasm.c

The util/annotate.c code has both disassembly and sample annotation
related codes.  Factor out the disasm part so that it can be handled
more easily.

No functional changes intended.

Committer notes:

Add missing include env.h, util.h, bpf-event.h and bpf-util.h to
disasm.c, to fix things like:

  util/disasm.c: In function ‘symbol__disassemble_bpf’:
  util/disasm.c:1203:9: error: implicit declaration of function ‘perf_exe’ [-Werror=implicit-function-declaration]
   1203 |         perf_exe(tpath, sizeof(tpath));
        |         ^~~~~~~~

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240329215812.537846-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/Build
tools/perf/util/annotate.c
tools/perf/util/annotate.h
tools/perf/util/disasm.c [new file with mode: 0644]
tools/perf/util/disasm.h [new file with mode: 0644]