From: Jin Yao <yao.jin@linux.intel.com>
To: acme@kernel.org, jolsa@kernel.org
Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com,
kan.liang@intel.com, Jin Yao <yao.jin@linux.intel.com>
Subject: [PATCH v3 0/6] perf report: Show branch flags/cycles in --branch-history callgraph view
Date: Wed, 26 Oct 2016 09:14:57 +0800 [thread overview]
Message-ID: <1477444503-25434-1-git-send-email-yao.jin@linux.intel.com> (raw)
v3: 1. Display the count for tsx abort, remove the abort percentage.
2. Since the branch history code has a loop detection that removes
small loops in util/machine.c:remove_loops(). It would be nice to
note how many loops were removed. So it adds the note on some
callchain entries.
v2: Just a rebase to Arnaldo's perf/core branch, no functional changes.
Initial post
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 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, removed loops:12954)
| | main div.c:44 (predicted:50.6%, cycles:1)
| | |
| | --22.69%--main div.c:42 (cycles:2, removed loops:21736)
| | compute_flag div.c:28 (cycles:2)
| | |
| | --10.52%--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)
Jin Yao (6):
perf report: Add branch flag to callchain cursor node
perf report: Caculate and return the branch flag counting
perf report: Create a symbol_conf flag for showing branch flag
counting
perf report: Show branch info in callchain entry for stdio mode
perf report: Show branch info in callchain entry for browser mode
perf report: Display columns Predicted/Abort/Cycles in
--branch-history
tools/perf/Documentation/perf-report.txt | 12 ++
tools/perf/builtin-report.c | 9 +-
tools/perf/ui/browsers/hists.c | 20 +++-
tools/perf/ui/stdio/hist.c | 35 +++++-
tools/perf/util/callchain.c | 197 ++++++++++++++++++++++++++++++-
tools/perf/util/callchain.h | 20 +++-
tools/perf/util/hist.c | 3 +
tools/perf/util/hist.h | 3 +
tools/perf/util/machine.c | 69 ++++++++---
tools/perf/util/sort.c | 113 +++++++++++++++++-
tools/perf/util/sort.h | 3 +
tools/perf/util/symbol.h | 1 +
12 files changed, 457 insertions(+), 28 deletions(-)
--
2.7.4
next reply other threads:[~2016-10-26 1:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 1:14 Jin Yao [this message]
2016-10-26 1:14 ` [PATCH v3 1/6] perf report: Add branch flag to callchain cursor node Jin Yao
2016-10-26 1:14 ` [PATCH v3 2/6] perf report: Caculate and return the branch flag counting Jin Yao
2016-10-26 1:15 ` [PATCH v3 3/6] perf report: Create a symbol_conf flag for showing " Jin Yao
2016-10-26 1:15 ` [PATCH v3 4/6] perf report: Show branch info in callchain entry for stdio mode Jin Yao
2016-10-26 1:15 ` [PATCH v3 5/6] perf report: Show branch info in callchain entry for browser mode Jin Yao
2016-10-26 1:15 ` [PATCH v3 6/6] perf report: Display columns Predicted/Abort/Cycles in --branch-history Jin Yao
2016-10-26 1:19 ` [PATCH v3 0/6] perf report: Show branch flags/cycles in --branch-history callgraph view Andi Kleen
2016-10-26 1:23 ` Jin, Yao
2016-10-26 16:35 ` Andi Kleen
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=1477444503-25434-1-git-send-email-yao.jin@linux.intel.com \
--to=yao.jin@linux.intel.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome