Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1503487
| From | Jin Yao <yao.jin@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 0/6] Show branch flags/cycles in perf report --branch-history callgraph view |
| Date | 2016-10-19 03:30 +0200 |
| Message-ID | <stNRD-220-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
perf record -g -b ...
perf report --branch-history
Currently it only shows the branches from the LBR in the callgraph view.
It would be useful to annotate branch predictions and TSX aborts and
also timed LBR cycles also in the callgraph view.
This would allow a quick overview where branch predictions are and how
costly basic blocks are.
For example:
Overhead Source:Line Symbol Shared Object Predicted Abort Cycles
........ ............................................ ......... .............. ......... ..... ......
38.25% div.c:45 [.] main div 97.6% 0.0% 3
|
---main div.c:42 (cycles:2)
compute_flag div.c:28 (cycles:2)
compute_flag div.c:27 (cycles:1)
rand rand.c:28 (cycles:1)
rand rand.c:28 (cycles:1)
__random random.c:298 (cycles:1)
__random random.c:297 (cycles:1)
__random random.c:295 (cycles:1)
__random random.c:295 (cycles:1)
__random random.c:295 (cycles:1)
__random random.c:295 (cycles:9)
|
|--36.73%--__random_r random_r.c:392 (cycles:9)
| __random_r random_r.c:357 (cycles:1)
| __random random.c:293 (cycles:1)
| __random random.c:293 (cycles:1)
| __random random.c:291 (cycles:1)
| __random random.c:291 (cycles:1)
| __random random.c:291 (cycles:1)
| __random random.c:288 (cycles:1)
| rand rand.c:27 (cycles:1)
| rand rand.c:26 (cycles:1)
| rand@plt +4194304 (cycles:1)
| rand@plt +4194304 (cycles:1)
| compute_flag div.c:25 (cycles:1)
| compute_flag div.c:22 (cycles:1)
| main div.c:40 (cycles:1)
| main div.c:40 (cycles:16)
| main div.c:39 (cycles:16)
| |
| |--29.93%--main div.c:39 (predicted:50.6%, cycles:1)
| | main div.c:44 (predicted:50.6%, cycles:1)
| | |
| | --22.69%--main div.c:42 (cycles:2)
Predicted is hide in callchain entry if the branch is 100% predicted.
Abort is hide in callchain entry if the branch is 0 aborted.
Now stdio and browser modes are both supported.
Jin Yao (6):
perf report: Add branch flag to callchain cursor node
perf report: Caculate and return the branch counting in callchain
perf report: Create a symbol_conf flag for showing branch flag
counting
perf report: Show branch info in callchain entry with stdio mode
perf report: Show branch info in callchain entry with browser mode
perf report: Display keys Predicted/Abort/Cycles in --branch-history
tools/perf/Documentation/perf-report.txt | 8 ++
tools/perf/builtin-report.c | 9 +-
tools/perf/ui/browsers/hists.c | 15 ++-
tools/perf/ui/stdio/hist.c | 30 +++++-
tools/perf/util/callchain.c | 176 ++++++++++++++++++++++++++++++-
tools/perf/util/callchain.h | 16 ++-
tools/perf/util/hist.c | 3 +
tools/perf/util/hist.h | 3 +
tools/perf/util/machine.c | 56 +++++++---
tools/perf/util/sort.c | 117 +++++++++++++++++++-
tools/perf/util/sort.h | 3 +
tools/perf/util/symbol.h | 1 +
12 files changed, 411 insertions(+), 26 deletions(-)
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 0/6] Show branch flags/cycles in perf report --branch-history callgraph view Jin Yao <yao.jin@linux.intel.com> - 2016-10-19 03:30 +0200
[PATCH 3/6] perf report: Create a symbol_conf flag for showing branch flag counting Jin Yao <yao.jin@linux.intel.com> - 2016-10-19 03:30 +0200
Re: [PATCH 0/6] Show branch flags/cycles in perf report --branch-history callgraph view Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-19 16:30 +0200
Re: [PATCH 0/6] Show branch flags/cycles in perf report --branch-history callgraph view Jiri Olsa <jolsa@redhat.com> - 2016-10-19 17:00 +0200
Re: [PATCH 0/6] Show branch flags/cycles in perf report --branch-history callgraph view Jiri Olsa <jolsa@redhat.com> - 2016-10-19 18:10 +0200
Re: [PATCH 0/6] Show branch flags/cycles in perf report --branch-history callgraph view "Jin, Yao" <yao.jin@linux.intel.com> - 2016-10-19 18:30 +0200
csiph-web