From: He Kuang <hekuang@huawei.com>
To: <a.p.zijlstra@chello.nl>, <paulus@samba.org>, <mingo@redhat.com>,
<acme@kernel.org>
Cc: <wangnan0@huawei.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf report: Fix branch stack mode cannot be set
Date: Fri, 27 Feb 2015 17:58:44 +0800 [thread overview]
Message-ID: <54F03FD4.9030200@huawei.com> (raw)
In-Reply-To: <1423967617-28879-1-git-send-email-hekuang@huawei.com>
ping..
在 2015/2/15 10:33, He Kuang 写道:
> When perf.data file be abtained by using 'perf record -b', perf report
> should use branch stack mode to generate output. But this function is
> broken by improper comparison between boolean and constant -1.
>
> before this patch:
> $perf report -b -i perf.data
> Samples: 16 of event 'cycles', Event count (approx.): 3171896
> Overhead Command Shared Object Symbol
> 13.59% ls [kernel.kallsyms] [k] prio_tree_remove
> 13.16% ls [kernel.kallsyms] [k] change_pte_range
> 12.09% ls [kernel.kallsyms] [k] page_fault
> 12.02% ls [kernel.kallsyms] [k] zap_pte_range
> ...
>
> after this patch:
> $perf report -b -i perf.data
> Samples: 256 of event 'cycles', Event count (approx.): 256
> Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
> 9.38% ls [unknown] [k] 0000000000000000 [unknown] [k] 0000000000000000
> 6.25% ls libc-2.19.so [.] _dl_addr libc-2.19.so [.] _dl_addr
> 6.25% ls [kernel.kallsyms] [k] zap_pte_range [kernel.kallsyms] [k] zap_pte_range
> 6.25% ls [kernel.kallsyms] [k] change_pte_range [kernel.kallsyms] [k] change_pte_range
> 0.39% ls [kernel.kallsyms] [k] prio_tree_remove [kernel.kallsyms] [k] prio_tree_remove
> ...
>
> Signed-off-by: He Kuang <hekuang@huawei.com>
> ---
> tools/perf/builtin-report.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 2f91094..ecc453b 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -766,7 +766,7 @@ repeat:
> * 0/1 means the user chose a mode.
> */
> if (((branch_mode == -1 && has_br_stack) || branch_mode == 1) &&
> - branch_call_mode == -1) {
> + !branch_call_mode) {
> sort__mode = SORT_MODE__BRANCH;
> symbol_conf.cumulate_callchain = false;
> }
next prev parent reply other threads:[~2015-02-27 9:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-15 2:33 [PATCH] perf report: Fix branch stack mode cannot be set He Kuang
2015-02-27 9:58 ` He Kuang [this message]
2015-02-27 16:31 ` Arnaldo Carvalho de Melo
2015-02-28 9:35 ` [tip:perf/core] " tip-bot for He Kuang
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=54F03FD4.9030200@huawei.com \
--to=hekuang@huawei.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=wangnan0@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.