[PATCH] perf: unwind: suppress massive unsupported target platform errors

Changbin Du posted 1 patch 2 years, 7 months ago
tools/perf/util/unwind-libunwind.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] perf: unwind: suppress massive unsupported target platform errors
Posted by Changbin Du 2 years, 7 months ago
When cross-analyzing perf data recorded on an another platform, massive
unsupported target platform errors are printed. So let's show this message
as warning and only once.

Signed-off-by: Changbin Du <changbin.du@huawei.com>
---
 tools/perf/util/unwind-libunwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index 509c287ee762..e95adbedf6ed 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -54,7 +54,7 @@ int unwind__prepare_access(struct maps *maps, struct map *map, bool *initialized
 	}
 
 	if (!ops) {
-		pr_err("unwind: target platform=%s is not supported\n", arch);
+		pr_warning_once("unwind: target platform=%s is not supported\n", arch);
 		return 0;
 	}
 out_register:
-- 
2.25.1
Re: [PATCH] perf: unwind: suppress massive unsupported target platform errors
Posted by Arnaldo Carvalho de Melo 2 years, 7 months ago
Em Wed, Apr 26, 2023 at 11:22:46AM +0800, Changbin Du escreveu:
> When cross-analyzing perf data recorded on an another platform, massive
> unsupported target platform errors are printed. So let's show this message
> as warning and only once.

Thanks, applied.

- Arnaldo

 
> Signed-off-by: Changbin Du <changbin.du@huawei.com>
> ---
>  tools/perf/util/unwind-libunwind.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
> index 509c287ee762..e95adbedf6ed 100644
> --- a/tools/perf/util/unwind-libunwind.c
> +++ b/tools/perf/util/unwind-libunwind.c
> @@ -54,7 +54,7 @@ int unwind__prepare_access(struct maps *maps, struct map *map, bool *initialized
>  	}
>  
>  	if (!ops) {
> -		pr_err("unwind: target platform=%s is not supported\n", arch);
> +		pr_warning_once("unwind: target platform=%s is not supported\n", arch);
>  		return 0;
>  	}
>  out_register:
> -- 
> 2.25.1
> 

-- 

- Arnaldo