Re: [PATCH v1 06/10] perf, tools, report: Print better message for JITed code
From: Arnaldo Carvalho de Melo
Date: Mon Mar 11 2019 - 16:59:00 EST
Em Mon, Mar 11, 2019 at 01:48:56PM -0700, Andi Kleen escreveu:
> On Mon, Mar 11, 2019 at 05:33:02PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Mon, Mar 11, 2019 at 01:24:42PM -0700, Andi Kleen escreveu:
> > > + if (!strncmp(map->dso->name, "/tmp/perf-", 10)) {
> > > + static bool warned;
> > > + if (!warned) {
> > > + pr_err("Cannot find executable, JITed code present? May need agent.\n");
> > > + warned = true;
> > > + }
> > Please use WARN_ON_ONCE(), we have it in tools/include/asm/bug.h, just
> > like the kernel.
> But that prints "assertation failed". This is not a perf bug, but can happen
> in normal operation.
Sorry, we also have WARN_ONCE() and that one doesn't have any extra
message printed, only what you pass to it, right?
- Arnaldo