Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1739033

Re: [PATCH v2] perf report: Fix debug messages with --call-graph option

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] perf report: Fix debug messages with --call-graph option
Date 2017-09-25 15:10 +0200
Message-ID <utBj4-6Ms-3@gated-at.bofh.it> (permalink)
References <usNZ0-GL-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Sep 23, 2017 at 04:18:14PM +0800, Mengting Zhang wrote:
> With --call-graph option, perf report can display call chains using
> type, min percent threshold, optional print limit and order. And the
> default call-graph parameter is 'graph,0.5,caller,function,percent'.
> 
> Before this patch, 'perf report --call-graph' shows incorrect debug
> messages as below:
> [root@localhost perf]# ./perf report --call-graph
> Invalid callchain mode: 0.5
> Invalid callchain order: 0.5
> Invalid callchain sort key: 0.5
> Invalid callchain config key: 0.5
> Invalid callchain mode: caller
> Invalid callchain mode: function
> Invalid callchain order: function
> Invalid callchain mode: percent
> Invalid callchain order: percent
> Invalid callchain sort key: percent
> 
> That is because in function __parse_callchain_report_opt(),each field
> of the call-graph parameter is passed to parse_callchain_{mode,order,
> sort_key,value} in turn until it meets the matching value.
> 
> For example, the order field "caller" is passed to parse_callchain_mode()
> firstly and obviously it doesn't match any mode field. Therefore
> parse_callchain_mode() will shows the debug message "Invalid callchain
> mode: caller", which could confuse users.
> 
> The patch fixes this issue by moving the warning out of the function
> parse_callchain_{mode,order,sort_key,value}.
> 
> Signed-off-by: Mengting Zhang <zhangmengting@huawei.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] perf report: Fix debug messages with --call-graph option Mengting Zhang <zhangmengting@huawei.com> - 2017-09-23 10:30 +0200
  Re: [PATCH v2] perf report: Fix debug messages with --call-graph  option Jiri Olsa <jolsa@redhat.com> - 2017-09-25 15:10 +0200
    Re: [PATCH v2] perf report: Fix debug messages with --call-graph  option Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-09-25 15:50 +0200

csiph-web