From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
Kan Liang <kan.liang@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 3/5] perf annotate: Split out util/disasm.c
Date: Wed, 3 Apr 2024 11:13:29 -0300 [thread overview]
Message-ID: <Zg1kCT3V3n9l0fJc@x1> (raw)
In-Reply-To: <CAM9d7cgyeaeTPyw5fZjX2OsVrGqv-VrqpU_RPgUu8yWN+qTDsg@mail.gmail.com>
On Tue, Apr 02, 2024 at 04:03:33PM -0700, Namhyung Kim wrote:
> On Tue, Apr 2, 2024 at 3:11 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> >
> > On Tue, Apr 02, 2024 at 07:08:04PM -0300, Arnaldo Carvalho de Melo wrote:
> > > On Fri, Mar 29, 2024 at 02:58:10PM -0700, Namhyung Kim wrote:
> > > > 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.
> > > >
> > >
> > > Unsure if here, will check and fix later, detected with:
> > >
> > > make -C tools/perf build-test'
> >
> > did it, added the missing env.h header to disasm.c
> Thanks a lot!
Three more, also fixed:
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));
| ^~~~~~~~
diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
index 3438c31437f46e71..c2664215554d0bb3 100644
--- a/tools/perf/util/disasm.c
+++ b/tools/perf/util/disasm.c
@@ -21,6 +21,7 @@
#include "maps.h"
#include "srcline.h"
#include "symbol.h"
+#include "util.h"
static regex_t file_lineno;
util/disasm.c:1229:32: error: invalid use of undefined type ‘struct bpf_prog_info_node’
1229 | info_linear = info_node->info_linear;
| ^~
util/disasm.c: In function ‘symbol__disassemble_bpf’:
util/disasm.c:1230:32: error: invalid use of undefined type ‘struct bpf_prog_info_node’
1230 | info_linear = info_node->info_linear;
| ^~
diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
index c2664215554d0bb3..5b5407525b31f47f 100644
--- a/tools/perf/util/disasm.c
+++ b/tools/perf/util/disasm.c
@@ -1170,6 +1170,8 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
#include <linux/btf.h>
#include <tools/dis-asm-compat.h>
+#include "bpf-event.h"
+
static int symbol__disassemble_bpf(struct symbol *sym,
struct annotate_args *args)
{
util/disasm.c: In function ‘symbol__disassemble_bpf’:
util/disasm.c:1235:54: error: invalid use of undefined type ‘struct perf_bpil’
1235 | info.buffer = (void *)(uintptr_t)(info_linear->info.jited_prog_insns);
|
diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
index a88d33fd38a58e4a..a1219eb930aaeb5a 100644
--- a/tools/perf/util/disasm.c
+++ b/tools/perf/util/disasm.c
@@ -1173,6 +1173,7 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
#include <tools/dis-asm-compat.h>
#include "bpf-event.h"
+#include "bpf-utils.h"
static int symbol__disassemble_bpf(struct symbol *sym,
struct annotate_args *args)
next prev parent reply other threads:[~2024-04-03 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 21:58 [PATCH v2 0/5] perf annotate: Use libcapstone as a disasssembler Namhyung Kim
2024-03-29 21:58 ` [PATCH v2 1/5] perf annotate: Use ins__is_xxx() if possible Namhyung Kim
2024-03-29 21:58 ` [PATCH v2 2/5] perf annotate: Add and use ins__is_nop() Namhyung Kim
2024-03-29 21:58 ` [PATCH v2 3/5] perf annotate: Split out util/disasm.c Namhyung Kim
2024-04-02 22:08 ` Arnaldo Carvalho de Melo
2024-04-02 22:11 ` Arnaldo Carvalho de Melo
2024-04-02 23:03 ` Namhyung Kim
2024-04-03 14:13 ` Arnaldo Carvalho de Melo [this message]
2024-03-29 21:58 ` [PATCH v2 4/5] perf annotate: Use libcapstone to disassemble Namhyung Kim
2024-03-29 21:58 ` [PATCH v2 5/5] perf annotate: Add symbol name when using capstone Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zg1kCT3V3n9l0fJc@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.