From: Jiri Olsa <jolsa@redhat.com>
To: Mengting Zhang <zhangmengting@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
alexander.shishkin@linux.intel.com, yao.jin@linux.intel.com,
ak@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org,
kjlx@templeofstupid.com, milian.wolff@kdab.com,
wangnan0@huawei.com, huawei.libin@huawei.com
Subject: Re: [PATCH v2] perf report: Fix debug messages with --call-graph option
Date: Mon, 25 Sep 2017 15:02:51 +0200 [thread overview]
Message-ID: <20170925130251.GA20935@krava> (raw)
In-Reply-To: <1506154694-39691-1-git-send-email-zhangmengting@huawei.com>
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
next prev parent reply other threads:[~2017-09-25 13:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-23 8:18 [PATCH v2] perf report: Fix debug messages with --call-graph option Mengting Zhang
2017-09-23 8:18 ` Mengting Zhang
2017-09-25 13:02 ` Jiri Olsa [this message]
2017-09-25 13:47 ` Arnaldo Carvalho de Melo
2017-09-29 20:05 ` [tip:perf/urgent] " tip-bot for Mengting Zhang
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=20170925130251.GA20935@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=huawei.libin@huawei.com \
--cc=jolsa@kernel.org \
--cc=kjlx@templeofstupid.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
--cc=yao.jin@linux.intel.com \
--cc=zhangmengting@huawei.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.