* [PATCH] perf top: Display the LBR stats in callchain entry
@ 2018-10-31 11:06 Jin Yao
2018-11-05 0:31 ` Jin, Yao
2018-11-06 19:14 ` [tip:perf/urgent] " tip-bot for Jin Yao
0 siblings, 2 replies; 5+ messages in thread
From: Jin Yao @ 2018-10-31 11:06 UTC (permalink / raw)
To: acme, jolsa, peterz, mingo, alexander.shishkin
Cc: Linux-kernel, ak, kan.liang, yao.jin, Jin Yao
Perf report has supported the displaying of LBR stats
(such as cycles, predicted%) in callchain entry.
For example,
perf report --branch-history --stdio
--1.01%--intel_idle mwait.h:29
intel_idle cpufeature.h:164 (cycles:5)
intel_idle cpufeature.h:164 (predicted:76.4%)
intel_idle mwait.h:102 (cycles:41)
intel_idle current.h:15
While perf top has not supported that.
For example,
perf top -a -b --call-graph branch
- 13.86% 0.23% [kernel] [k] __x86_indirect_thunk_rax
- 13.65% __x86_indirect_thunk_rax
+ 1.69% do_syscall_64
+ 1.68% do_select
+ 1.41% ktime_get
+ 0.70% __schedule
+ 0.62% do_sys_poll
0.58% __x86_indirect_thunk_rax
Actually it's very easy to enable this feature in perf top.
With this patch, the result is:
perf top -a -b --call-graph branch
- 13.58% 0.00% [kernel] [k] __x86_indirect_thunk_rax
- 13.57% __x86_indirect_thunk_rax (predicted:93.9%)
+ 1.78% do_select (cycles:2)
+ 1.68% perf_pmu_disable.part.99 (cycles:1)
+ 1.45% ___sys_recvmsg (cycles:25)
+ 0.81% unix_stream_sendmsg (cycles:18)
+ 0.80% ktime_get (cycles:400)
0.58% pick_next_task_fair (cycles:47)
+ 0.56% i915_request_retire (cycles:2)
+ 0.52% do_sys_poll (cycles:4)
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
---
tools/perf/builtin-top.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index d21d875..7691b21 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1420,6 +1420,9 @@ int cmd_top(int argc, const char **argv)
}
}
+ if (opts->branch_stack && callchain_param.enabled)
+ symbol_conf.show_branchflag_count = true;
+
sort__mode = SORT_MODE__TOP;
/* display thread wants entries to be collapsed in a different tree */
perf_hpp_list.need_collapse = 1;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] perf top: Display the LBR stats in callchain entry
2018-10-31 11:06 [PATCH] perf top: Display the LBR stats in callchain entry Jin Yao
@ 2018-11-05 0:31 ` Jin, Yao
2018-11-05 13:10 ` Arnaldo Carvalho de Melo
2018-11-06 19:14 ` [tip:perf/urgent] " tip-bot for Jin Yao
1 sibling, 1 reply; 5+ messages in thread
From: Jin, Yao @ 2018-11-05 0:31 UTC (permalink / raw)
To: acme, jolsa, peterz, mingo, alexander.shishkin
Cc: Linux-kernel, ak, kan.liang, yao.jin
Hi,
Any comments for this patch?
Thanks
Jin Yao
On 10/31/2018 7:06 PM, Jin Yao wrote:
> Perf report has supported the displaying of LBR stats
> (such as cycles, predicted%) in callchain entry.
>
> For example,
> perf report --branch-history --stdio
>
> --1.01%--intel_idle mwait.h:29
> intel_idle cpufeature.h:164 (cycles:5)
> intel_idle cpufeature.h:164 (predicted:76.4%)
> intel_idle mwait.h:102 (cycles:41)
> intel_idle current.h:15
>
> While perf top has not supported that.
>
> For example,
> perf top -a -b --call-graph branch
>
> - 13.86% 0.23% [kernel] [k] __x86_indirect_thunk_rax
> - 13.65% __x86_indirect_thunk_rax
> + 1.69% do_syscall_64
> + 1.68% do_select
> + 1.41% ktime_get
> + 0.70% __schedule
> + 0.62% do_sys_poll
> 0.58% __x86_indirect_thunk_rax
>
> Actually it's very easy to enable this feature in perf top.
>
> With this patch, the result is:
>
> perf top -a -b --call-graph branch
>
> - 13.58% 0.00% [kernel] [k] __x86_indirect_thunk_rax
> - 13.57% __x86_indirect_thunk_rax (predicted:93.9%)
> + 1.78% do_select (cycles:2)
> + 1.68% perf_pmu_disable.part.99 (cycles:1)
> + 1.45% ___sys_recvmsg (cycles:25)
> + 0.81% unix_stream_sendmsg (cycles:18)
> + 0.80% ktime_get (cycles:400)
> 0.58% pick_next_task_fair (cycles:47)
> + 0.56% i915_request_retire (cycles:2)
> + 0.52% do_sys_poll (cycles:4)
>
> Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
> ---
> tools/perf/builtin-top.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index d21d875..7691b21 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -1420,6 +1420,9 @@ int cmd_top(int argc, const char **argv)
> }
> }
>
> + if (opts->branch_stack && callchain_param.enabled)
> + symbol_conf.show_branchflag_count = true;
> +
> sort__mode = SORT_MODE__TOP;
> /* display thread wants entries to be collapsed in a different tree */
> perf_hpp_list.need_collapse = 1;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf top: Display the LBR stats in callchain entry
2018-11-05 0:31 ` Jin, Yao
@ 2018-11-05 13:10 ` Arnaldo Carvalho de Melo
2018-11-05 17:23 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-11-05 13:10 UTC (permalink / raw)
To: Jin, Yao
Cc: jolsa, peterz, mingo, alexander.shishkin, Linux-kernel, ak,
kan.liang, yao.jin
Em Mon, Nov 05, 2018 at 08:31:59AM +0800, Jin, Yao escreveu:
> Hi,
>
> Any comments for this patch?
I'll check it today, I'm just a bit behind while preparing for plumbers,
I'll get to all the patches :-)
- Arnaldo
> Thanks
> Jin Yao
>
> On 10/31/2018 7:06 PM, Jin Yao wrote:
> > Perf report has supported the displaying of LBR stats
> > (such as cycles, predicted%) in callchain entry.
> >
> > For example,
> > perf report --branch-history --stdio
> >
> > --1.01%--intel_idle mwait.h:29
> > intel_idle cpufeature.h:164 (cycles:5)
> > intel_idle cpufeature.h:164 (predicted:76.4%)
> > intel_idle mwait.h:102 (cycles:41)
> > intel_idle current.h:15
> >
> > While perf top has not supported that.
> >
> > For example,
> > perf top -a -b --call-graph branch
> >
> > - 13.86% 0.23% [kernel] [k] __x86_indirect_thunk_rax
> > - 13.65% __x86_indirect_thunk_rax
> > + 1.69% do_syscall_64
> > + 1.68% do_select
> > + 1.41% ktime_get
> > + 0.70% __schedule
> > + 0.62% do_sys_poll
> > 0.58% __x86_indirect_thunk_rax
> >
> > Actually it's very easy to enable this feature in perf top.
> >
> > With this patch, the result is:
> >
> > perf top -a -b --call-graph branch
> >
> > - 13.58% 0.00% [kernel] [k] __x86_indirect_thunk_rax
> > - 13.57% __x86_indirect_thunk_rax (predicted:93.9%)
> > + 1.78% do_select (cycles:2)
> > + 1.68% perf_pmu_disable.part.99 (cycles:1)
> > + 1.45% ___sys_recvmsg (cycles:25)
> > + 0.81% unix_stream_sendmsg (cycles:18)
> > + 0.80% ktime_get (cycles:400)
> > 0.58% pick_next_task_fair (cycles:47)
> > + 0.56% i915_request_retire (cycles:2)
> > + 0.52% do_sys_poll (cycles:4)
> >
> > Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
> > ---
> > tools/perf/builtin-top.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> > index d21d875..7691b21 100644
> > --- a/tools/perf/builtin-top.c
> > +++ b/tools/perf/builtin-top.c
> > @@ -1420,6 +1420,9 @@ int cmd_top(int argc, const char **argv)
> > }
> > }
> > + if (opts->branch_stack && callchain_param.enabled)
> > + symbol_conf.show_branchflag_count = true;
> > +
> > sort__mode = SORT_MODE__TOP;
> > /* display thread wants entries to be collapsed in a different tree */
> > perf_hpp_list.need_collapse = 1;
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf top: Display the LBR stats in callchain entry
2018-11-05 13:10 ` Arnaldo Carvalho de Melo
@ 2018-11-05 17:23 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-11-05 17:23 UTC (permalink / raw)
To: Jin, Yao
Cc: jolsa, peterz, mingo, alexander.shishkin, Linux-kernel, ak,
kan.liang, yao.jin
Em Mon, Nov 05, 2018 at 10:10:27AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Nov 05, 2018 at 08:31:59AM +0800, Jin, Yao escreveu:
> > Hi,
> >
> > Any comments for this patch?
>
> I'll check it today, I'm just a bit behind while preparing for plumbers,
> I'll get to all the patches :-)
Thanks, tested, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:perf/urgent] perf top: Display the LBR stats in callchain entry
2018-10-31 11:06 [PATCH] perf top: Display the LBR stats in callchain entry Jin Yao
2018-11-05 0:31 ` Jin, Yao
@ 2018-11-06 19:14 ` tip-bot for Jin Yao
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Jin Yao @ 2018-11-06 19:14 UTC (permalink / raw)
To: linux-tip-commits
Cc: jolsa, linux-kernel, acme, hpa, kan.liang, ak, peterz,
alexander.shishkin, yao.jin, mingo, tglx
Commit-ID: 590ac60d8aa929bd21e35cd95a7d8720d00eb4f3
Gitweb: https://git.kernel.org/tip/590ac60d8aa929bd21e35cd95a7d8720d00eb4f3
Author: Jin Yao <yao.jin@linux.intel.com>
AuthorDate: Wed, 31 Oct 2018 19:06:35 +0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 5 Nov 2018 14:37:11 -0300
perf top: Display the LBR stats in callchain entry
'perf report' has supported the displaying of LBR stats (such as cycles,
predicted%) in callchain entry.
For example:
$ perf report --branch-history --stdio
--1.01%--intel_idle mwait.h:29
intel_idle cpufeature.h:164 (cycles:5)
intel_idle cpufeature.h:164 (predicted:76.4%)
intel_idle mwait.h:102 (cycles:41)
intel_idle current.h:15
While 'perf top' doesn't support that.
For example:
$ perf top -a -b --call-graph branch
- 13.86% 0.23% [kernel] [k] __x86_indirect_thunk_rax
- 13.65% __x86_indirect_thunk_rax
+ 1.69% do_syscall_64
+ 1.68% do_select
+ 1.41% ktime_get
+ 0.70% __schedule
+ 0.62% do_sys_poll
0.58% __x86_indirect_thunk_rax
Actually it's very easy to enable this feature in 'perf top'.
With this patch, the result is:
$ perf top -a -b --call-graph branch
$ - 13.58% 0.00% [kernel] [k] __x86_indirect_thunk_rax
$ - 13.57% __x86_indirect_thunk_rax (predicted:93.9%)
$ + 1.78% do_select (cycles:2)
$ + 1.68% perf_pmu_disable.part.99 (cycles:1)
$ + 1.45% ___sys_recvmsg (cycles:25)
$ + 0.81% unix_stream_sendmsg (cycles:18)
$ + 0.80% ktime_get (cycles:400)
$ 0.58% pick_next_task_fair (cycles:47)
$ + 0.56% i915_request_retire (cycles:2)
$ + 0.52% do_sys_poll (cycles:4)
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1540983995-20462-1-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-top.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index b2838de13de0..aa0c73e57924 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1429,6 +1429,9 @@ int cmd_top(int argc, const char **argv)
}
}
+ if (opts->branch_stack && callchain_param.enabled)
+ symbol_conf.show_branchflag_count = true;
+
sort__mode = SORT_MODE__TOP;
/* display thread wants entries to be collapsed in a different tree */
perf_hpp_list.need_collapse = 1;
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-06 19:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-31 11:06 [PATCH] perf top: Display the LBR stats in callchain entry Jin Yao
2018-11-05 0:31 ` Jin, Yao
2018-11-05 13:10 ` Arnaldo Carvalho de Melo
2018-11-05 17:23 ` Arnaldo Carvalho de Melo
2018-11-06 19:14 ` [tip:perf/urgent] " tip-bot for Jin Yao
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.