Re: [PATCH v2 6/6] perf-probe: Replace unacceptable characters when generating event name
From: Google
Date: Tue Nov 12 2024 - 19:13:01 EST
Hi Arnaldo,
On Wed, 13 Nov 2024 08:38:47 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:
> On Tue, 12 Nov 2024 14:28:55 -0300
> Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
>
> > On Thu, Nov 07, 2024 at 11:52:58PM +0900, Masami Hiramatsu (Google) wrote:
> > > From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
> >
> > This last patch isn't applying, to make progress I appled 1-5, please
> > take a look at the tmp.perf-tools-next branch at:
> >
>
> OK, let me resend on top of that branch.
>
> Thank you!
>
> > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git tmp.perf-tools-next
> >
It seems that this branch can not be compiled without below patch.
(in LIBCAPSTONE=n but LIBLLVM=y case.)
diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c
index df6c172c9c7f..88f71f6e5e70 100644
--- a/tools/perf/util/disasm.c
+++ b/tools/perf/util/disasm.c
@@ -1422,14 +1422,14 @@ read_symbol(const char *filename, struct map *map, struct symbol *sym,
free(buf);
return NULL;
}
-#else // defined(HAVE_LIBCAPSTONE_SUPPORT) || defined(HAVE_LIBLLVM_SUPPORT)
+#endif // defined(HAVE_LIBCAPSTONE_SUPPORT) || defined(HAVE_LIBLLVM_SUPPORT)
+
static void symbol__disassembler_missing(const char *disassembler, const char *filename,
struct symbol *sym)
{
pr_debug("The %s disassembler isn't linked in for %s in %s\n",
disassembler, sym->name, filename);
}
-#endif
#ifdef HAVE_LIBCAPSTONE_SUPPORT
static void print_capstone_detail(cs_insn *insn, char *buf, size_t len,
@@ -1724,7 +1724,8 @@ static int symbol__disassemble_capstone(char *filename, struct symbol *sym,
}
#else // HAVE_LIBCAPSTONE_SUPPORT
static int symbol__disassemble_capstone(char *filename, struct symbol *sym,
- struct annotate_args *args)
+ struct annotate_args *args __maybe_unused)
+{
symbol__disassembler_missing("capstone", filename, sym);
return -1;
}
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>