All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] perf tools: Warning fixes
@ 2021-08-05 13:03 ` James Clark
  0 siblings, 0 replies; 6+ messages in thread
From: James Clark @ 2021-08-05 13:03 UTC (permalink / raw)
  To: acme, mathieu.poirier, leo.yan, coresight, linux-perf-users
  Cc: suzuki.poulose, mike.leach, James Clark, John Garry, Will Deacon,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-arm-kernel, linux-kernel

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(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 0/1] perf tools: Warning fixes
@ 2021-08-05 13:03 ` James Clark
  0 siblings, 0 replies; 6+ messages in thread
From: James Clark @ 2021-08-05 13:03 UTC (permalink / raw)
  To: acme, mathieu.poirier, leo.yan, coresight, linux-perf-users
  Cc: suzuki.poulose, mike.leach, James Clark, John Garry, Will Deacon,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-arm-kernel, linux-kernel

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(-)

-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 1/1] perf cs-etm: Add warnings for missing DSOs
  2021-08-05 13:03 ` James Clark
@ 2021-08-05 13:03   ` James Clark
  -1 siblings, 0 replies; 6+ messages in thread
From: James Clark @ 2021-08-05 13:03 UTC (permalink / raw)
  To: acme, mathieu.poirier, leo.yan, coresight, linux-perf-users
  Cc: suzuki.poulose, mike.leach, James Clark, John Garry, Will Deacon,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-arm-kernel, linux-kernel

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.

Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
---
 tools/perf/util/cs-etm.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index f4b2bff533f3..b59d234e437d 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -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;
 }
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 1/1] perf cs-etm: Add warnings for missing DSOs
@ 2021-08-05 13:03   ` James Clark
  0 siblings, 0 replies; 6+ messages in thread
From: James Clark @ 2021-08-05 13:03 UTC (permalink / raw)
  To: acme, mathieu.poirier, leo.yan, coresight, linux-perf-users
  Cc: suzuki.poulose, mike.leach, James Clark, John Garry, Will Deacon,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-arm-kernel, linux-kernel

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.

Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
---
 tools/perf/util/cs-etm.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index f4b2bff533f3..b59d234e437d 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -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;
 }
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 1/1] perf cs-etm: Add warnings for missing DSOs
  2021-08-05 13:03   ` James Clark
@ 2021-08-06 18:39     ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-08-06 18:39 UTC (permalink / raw)
  To: James Clark
  Cc: mathieu.poirier, leo.yan, coresight, linux-perf-users,
	suzuki.poulose, mike.leach, John Garry, Will Deacon,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-arm-kernel, linux-kernel

Em Thu, Aug 05, 2021 at 02:03:54PM +0100, James Clark escreveu:
> 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.
> 
> Reviewed-by: Leo Yan <leo.yan@linaro.org>
> Signed-off-by: James Clark <james.clark@arm.com>

Thanks, applied.

- Arnaldo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 1/1] perf cs-etm: Add warnings for missing DSOs
@ 2021-08-06 18:39     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-08-06 18:39 UTC (permalink / raw)
  To: James Clark
  Cc: mathieu.poirier, leo.yan, coresight, linux-perf-users,
	suzuki.poulose, mike.leach, John Garry, Will Deacon,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-arm-kernel, linux-kernel

Em Thu, Aug 05, 2021 at 02:03:54PM +0100, James Clark escreveu:
> 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.
> 
> Reviewed-by: Leo Yan <leo.yan@linaro.org>
> Signed-off-by: James Clark <james.clark@arm.com>

Thanks, applied.

- Arnaldo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-06 18:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 13:03 [PATCH v3 0/1] perf tools: Warning fixes James Clark
2021-08-05 13:03 ` James Clark
2021-08-05 13:03 ` [PATCH v3 1/1] perf cs-etm: Add warnings for missing DSOs James Clark
2021-08-05 13:03   ` James Clark
2021-08-06 18:39   ` Arnaldo Carvalho de Melo
2021-08-06 18:39     ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.