lkml.org 
[lkml]   [2017]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@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

\
 
 \ /
  Last update: 2017-09-25 15:03    [W:0.158 / U:1.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site