[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190311202446.10210-7-andi@firstfloor.org>
Date:   Mon, 11 Mar 2019 13:24:42 -0700
From:   Andi Kleen <andi@...stfloor.org>
To:     acme@...nel.org
Cc:     jolsa@...nel.org, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH v1 06/10] perf, tools, report: Print better message for JITed code
From: Andi Kleen <ak@...ux.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@...ux.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
Powered by blists - more mailing lists