* [PATCH] perf report: Add warning when libunwind not compiled in
@ 2019-10-11 2:21 Jin Yao
2019-10-14 14:13 ` Arnaldo Carvalho de Melo
2019-10-21 23:19 ` [tip: perf/core] " tip-bot2 for Jin Yao
0 siblings, 2 replies; 3+ messages in thread
From: Jin Yao @ 2019-10-11 2:21 UTC (permalink / raw)
To: acme, jolsa, peterz, mingo, alexander.shishkin
Cc: Linux-kernel, ak, kan.liang, yao.jin, Jin Yao
We received a user report that call-graph dwarf mode was enabled in perf
record but perf report didn't unwind the callstack correctly. The reason was,
libunwind was not compiled in.
We can use 'perf -vv' to check the compiled libraries but it would be valuable
to report a warning to user directly (especially valuable for perf newbie).
The warning is,
Warning:
Please install libunwind development packages during the perf build.
Both tui and stdio are supported.
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
---
tools/perf/builtin-report.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index aae0e57c60fb..7accaf8ef689 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -399,6 +399,13 @@ static int report__setup_sample_type(struct report *rep)
PERF_SAMPLE_BRANCH_ANY))
rep->nonany_branch_mode = true;
+#ifndef HAVE_LIBUNWIND_SUPPORT
+ if (dwarf_callchain_users) {
+ ui__warning("Please install libunwind development packages "
+ "during the perf build.\n");
+ }
+#endif
+
return 0;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf report: Add warning when libunwind not compiled in
2019-10-11 2:21 [PATCH] perf report: Add warning when libunwind not compiled in Jin Yao
@ 2019-10-14 14:13 ` Arnaldo Carvalho de Melo
2019-10-21 23:19 ` [tip: perf/core] " tip-bot2 for Jin Yao
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-10-14 14:13 UTC (permalink / raw)
To: Jin Yao
Cc: jolsa, peterz, mingo, alexander.shishkin, Linux-kernel, ak,
kan.liang, yao.jin
Em Fri, Oct 11, 2019 at 10:21:22AM +0800, Jin Yao escreveu:
> We received a user report that call-graph dwarf mode was enabled in perf
> record but perf report didn't unwind the callstack correctly. The reason was,
> libunwind was not compiled in.
>
> We can use 'perf -vv' to check the compiled libraries but it would be valuable
> to report a warning to user directly (especially valuable for perf newbie).
>
> The warning is,
>
> Warning:
> Please install libunwind development packages during the perf build.
>
> Both tui and stdio are supported.
Thanks, applied.
> Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
> ---
> tools/perf/builtin-report.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index aae0e57c60fb..7accaf8ef689 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -399,6 +399,13 @@ static int report__setup_sample_type(struct report *rep)
> PERF_SAMPLE_BRANCH_ANY))
> rep->nonany_branch_mode = true;
>
> +#ifndef HAVE_LIBUNWIND_SUPPORT
> + if (dwarf_callchain_users) {
> + ui__warning("Please install libunwind development packages "
> + "during the perf build.\n");
> + }
> +#endif
> +
> return 0;
> }
>
> --
> 2.17.1
--
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: perf/core] perf report: Add warning when libunwind not compiled in
2019-10-11 2:21 [PATCH] perf report: Add warning when libunwind not compiled in Jin Yao
2019-10-14 14:13 ` Arnaldo Carvalho de Melo
@ 2019-10-21 23:19 ` tip-bot2 for Jin Yao
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Jin Yao @ 2019-10-21 23:19 UTC (permalink / raw)
To: linux-tip-commits
Cc: Jin Yao, Alexander Shishkin, Andi Kleen, Jiri Olsa, Kan Liang,
Peter Zijlstra, Arnaldo Carvalho de Melo, Ingo Molnar,
Borislav Petkov, linux-kernel
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 800d3f561659b5436f8c57e7c26dd1f6928b5615
Gitweb: https://git.kernel.org/tip/800d3f561659b5436f8c57e7c26dd1f6928b5615
Author: Jin Yao <yao.jin@linux.intel.com>
AuthorDate: Fri, 11 Oct 2019 10:21:22 +08:00
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Tue, 15 Oct 2019 08:36:22 -03:00
perf report: Add warning when libunwind not compiled in
We received a user report that call-graph DWARF mode was enabled in
'perf record' but 'perf report' didn't unwind the callstack correctly.
The reason was, libunwind was not compiled in.
We can use 'perf -vv' to check the compiled libraries but it would be
valuable to report a warning to user directly (especially valuable for
a perf newbie).
The warning is:
Warning:
Please install libunwind development packages during the perf build.
Both TUI and stdio are supported.
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20191011022122.26369-1-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-report.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index aae0e57..7accaf8 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -399,6 +399,13 @@ static int report__setup_sample_type(struct report *rep)
PERF_SAMPLE_BRANCH_ANY))
rep->nonany_branch_mode = true;
+#ifndef HAVE_LIBUNWIND_SUPPORT
+ if (dwarf_callchain_users) {
+ ui__warning("Please install libunwind development packages "
+ "during the perf build.\n");
+ }
+#endif
+
return 0;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-22 0:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 2:21 [PATCH] perf report: Add warning when libunwind not compiled in Jin Yao
2019-10-14 14:13 ` Arnaldo Carvalho de Melo
2019-10-21 23:19 ` [tip: perf/core] " tip-bot2 for Jin Yao
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).