All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jin Yao <yao.jin@linux.intel.com>
Cc: jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com,
	alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org,
	ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH] perf report: Add warning when libunwind not compiled in
Date: Mon, 14 Oct 2019 11:13:04 -0300	[thread overview]
Message-ID: <20191014141304.GE19627@kernel.org> (raw)
In-Reply-To: <20191011022122.26369-1-yao.jin@linux.intel.com>

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

  reply	other threads:[~2019-10-14 14:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-10-21 23:19 ` [tip: perf/core] " tip-bot2 for Jin Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191014141304.GE19627@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    --cc=yao.jin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.