[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170925130251.GA20935@krava>
Date: Mon, 25 Sep 2017 15:02:51 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Mengting Zhang <zhangmengting@...wei.com>
Cc: linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, yao.jin@...ux.intel.com,
ak@...ux.intel.com, jolsa@...nel.org, namhyung@...nel.org,
kjlx@...pleofstupid.com, milian.wolff@...b.com,
wangnan0@...wei.com, huawei.libin@...wei.com
Subject: Re: [PATCH v2] perf report: Fix debug messages with --call-graph
option
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@...alhost 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@...wei.com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
thanks,
jirka
Powered by blists - more mailing lists