Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757356AbdDQXCl (ORCPT ); Mon, 17 Apr 2017 19:02:41 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:32896 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755717AbdDQXC0 (ORCPT ); Mon, 17 Apr 2017 19:02:26 -0400 From: Alexis Berlemont To: linux-kernel@vger.kernel.org Cc: Alexis Berlemont , 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 Message-Id: <20170417225520.28082-4-alexis.berlemont@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417225520.28082-1-alexis.berlemont@gmail.com> References: <20170417225520.28082-1-alexis.berlemont@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1001 Lines: 30 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 --- 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