From: Alexis Berlemont <alexis.berlemont@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>,
peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
alexander.shishkin@linux.intel.com
Subject: [PATCH 3/3] perf report: fill per-callchain symbol annotation histograms
Date: Tue, 18 Apr 2017 00:55:20 +0200 [thread overview]
Message-ID: <20170417225520.28082-4-alexis.berlemont@gmail.com> (raw)
In-Reply-To: <20170417225520.28082-1-alexis.berlemont@gmail.com>
The per-callchain histograms must be fed at some points with the
profiling samples. A solution is to fill them right after having filled
the per-symbol ones: in the callback hist_iter__report_callback.
Signed-off-by: Alexis Berlemont <alexis.berlemont@gmail.com>
---
tools/perf/builtin-report.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index c18158b83eb1..d825a599d4b4 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -136,6 +136,14 @@ static int hist_iter__report_callback(struct hist_entry_iter *iter,
if (single)
err = hist_entry__inc_addr_samples(he, evsel->idx,
al->addr);
+ if (err == 0) {
+ struct callchain_cursor *cursor = &callchain_cursor;
+
+ err = hist_entry_cxt__inc_addr_samples(he,
+ evsel->idx,
+ al->addr,
+ cursor);
+ }
} else {
err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr);
}
--
2.12.2
prev parent reply other threads:[~2017-04-17 23:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-17 22:55 [PATCH 0/3] perf: callchain-specific annotation Alexis Berlemont
2017-04-17 22:55 ` [PATCH 1/3] perf annotate: implement per-callchain annotation histogram Alexis Berlemont
2017-04-17 22:55 ` [PATCH 2/3] perf hists browser: add callchain-specific annotation Alexis Berlemont
2017-04-17 22:55 ` Alexis Berlemont [this message]
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=20170417225520.28082-4-alexis.berlemont@gmail.com \
--to=alexis.berlemont@gmail.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®