Skip to contentSkip to conversation

perf tools: Warning fixes

PATCH Applied James Clark 2 participants 3 messages Aug 5, 2021 – Aug 6, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v3 cover perf tools: Warning fixes

Changes since v2:
Add Leo's reviewed by tag that I missed

James Clark (1):
perf cs-etm: Add warnings for missing DSOs

 tools/perf/util/cs-etm.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Signature · 1 line
2.23.0
#1 lore raw

PATCH v3 1/1 perf cs-etm: Add warnings for missing DSOs

Currently decode will silently fail if no binary data is available for the decode. This is made worse if only partial data is available because the decode will appear to work, but any trace from that missing DSO will silently not be generated.

Add a UI popup once if there is any data missing, and then warn in the bottom left for each individual DSO that's missing.

---
 tools/perf/util/cs-etm.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
tools/perf/util/cs-etm.c +10 -1
index f4b2bff533f3..b59d234e437d 100644
@@ -716,8 +716,17 @@ static u32 cs_etm__mem_access(struct cs_etm_queue *etmq, u8 trace_chan_id,
 
 	len = dso__data_read_offset(al.map->dso, machine, offset, buffer, size);
 
-	if (len <= 0)
+	if (len <= 0) {
+		ui__warning_once("CS ETM Trace: Missing DSO. Use 'perf archive' or debuginfod to export data from the traced system.\n"
+				 "              Enable CONFIG_PROC_KCORE or use option '-k /path/to/vmlinux' for kernel symbols.\n");
+		if (!al.map->dso->auxtrace_warned) {
+			pr_err("CS ETM Trace: Debug data not found for address %#"PRIx64" in %s\n",
+				    address,
+				    al.map->dso->long_name ? al.map->dso->long_name : "Unknown");
+			al.map->dso->auxtrace_warned = true;
+		}
 		return 0;
+	}
 
 	return len;
 }
Signature · 1 line
2.23.0
maintainer Applied
#2 lore raw

Re: [PATCH v3 1/1] perf cs-etm: Add warnings for missing DSOs

Em Thu, Aug 05, 2021 at 02:03:54PM +0100, James Clark escreveu:

Quoted 10 lines

Currently decode will silently fail if no binary data is available for the decode. This is made worse if only partial data is available because the decode will appear to work, but any trace from that missing DSO will silently not be generated.

Add a UI popup once if there is any data missing, and then warn in the bottom left for each individual DSO that's missing.

Thanks, applied.

- Arnaldo