From: Andi Kleen <andi@firstfloor.org>
To: acme@kernel.org
Cc: jolsa@kernel.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: [PATCH v1 06/10] perf, tools, report: Print better message for JITed code
Date: Mon, 11 Mar 2019 13:24:42 -0700 [thread overview]
Message-ID: <20190311202446.10210-7-andi@firstfloor.org> (raw)
In-Reply-To: <20190311202446.10210-1-andi@firstfloor.org>
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;
+ }
+ return -1;
+ }
+
if (map->dso->has_build_id) {
char sbuild_id[SBUILD_ID_SIZE];
--
2.20.1
next prev parent reply other threads:[~2019-03-11 20:24 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 ` Andi Kleen [this message]
2019-03-11 20:33 ` [PATCH v1 06/10] perf, tools, report: Print better message for JITed code Arnaldo Carvalho de Melo
2019-03-11 20:48 ` Andi Kleen
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=20190311202446.10210-7-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.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).