linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	jolsa@kernel.org, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 06/10] perf, tools, report: Print better message for JITed code
Date: Mon, 11 Mar 2019 13:48:56 -0700	[thread overview]
Message-ID: <20190311204856.GD29294@tassilo.jf.intel.com> (raw)
In-Reply-To: <20190311203302.GB10690@kernel.org>

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:
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > The message about missing /tmp/perf-* for JITed code is quite confusing
> > to users. Add a better error message, but only print it once.
> > 
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> > ---
> >  tools/perf/util/map.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
> > index fbeb0c6efaa6..d476b76abc6a 100644
> > --- a/tools/perf/util/map.c
> > +++ b/tools/perf/util/map.c
> > @@ -316,6 +316,15 @@ int map__load(struct map *map)
> >  
> >  	nr = dso__load(map->dso, map);
> >  	if (nr < 0) {
> > +		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.

-Andi

  reply	other threads:[~2019-03-11 20:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 20:24 Misc improvements and bug fixes for perf Andi Kleen
2019-03-11 20:24 ` [PATCH v1 01/10] perf, tools, list: Filter metrics too Andi Kleen
2019-03-11 20:24 ` [PATCH v1 02/10] perf, tools, stat: Avoid memory overrun with -r Andi Kleen
2019-03-11 20:28   ` Andi Kleen
2019-03-11 20:24 ` [PATCH v1 03/10] perf, tools, record: Allow to limit number of reported perf.data files Andi Kleen
2019-03-11 20:24 ` [PATCH v1 04/10] perf, tools, record: Clarify help for --switch-output Andi Kleen
2019-03-12 10:30   ` Jiri Olsa
2019-03-11 20:24 ` [PATCH v1 05/10] perf, report: Show all sort keys in help output Andi Kleen
2019-03-12 10:30   ` Jiri Olsa
2019-03-12 16:43     ` Andi Kleen
2019-03-11 20:24 ` [PATCH v1 06/10] perf, tools, report: Print better message for JITed code Andi Kleen
2019-03-11 20:33   ` Arnaldo Carvalho de Melo
2019-03-11 20:48     ` Andi Kleen [this message]
2019-03-11 20:58       ` Arnaldo Carvalho de Melo
2019-03-11 20:24 ` [PATCH v1 07/10] perf, tools, report: Indicate JITed code better in report Andi Kleen
2019-03-11 20:24 ` [PATCH v1 08/10] perf, tools, script: Support relative time Andi Kleen
2019-03-11 20:24 ` [PATCH v1 09/10] perf, tools, stat: Fix --no-scale Andi Kleen
2019-03-11 20:24 ` [PATCH v1 10/10] perf, tools, stat: Improve scaling Andi Kleen
2019-03-12 10:31 ` Misc improvements and bug fixes for perf Jiri Olsa

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=20190311204856.GD29294@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=arnaldo.melo@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).