From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754058AbdG3JnD (ORCPT ); Sun, 30 Jul 2017 05:43:03 -0400 Received: from terminus.zytor.com ([65.50.211.136]:39901 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753883AbdG3JnB (ORCPT ); Sun, 30 Jul 2017 05:43:01 -0400 Date: Sun, 30 Jul 2017 02:40:47 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: hpa@zytor.com, treeze.taeung@gmail.com, namhyung@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, jolsa@redhat.com, mingo@kernel.org, acme@redhat.com, milian.wolff@kdab.com Reply-To: jolsa@redhat.com, linux-kernel@vger.kernel.org, mingo@kernel.org, milian.wolff@kdab.com, acme@redhat.com, treeze.taeung@gmail.com, hpa@zytor.com, namhyung@kernel.org, tglx@linutronix.de To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf annotate TUI: Use sym_hist_entry in disasm_line_samples Git-Commit-ID: bb79a232b0881ce47f921a53f40612a9f9996482 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: bb79a232b0881ce47f921a53f40612a9f9996482 Gitweb: http://git.kernel.org/tip/bb79a232b0881ce47f921a53f40612a9f9996482 Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 27 Jul 2017 11:24:59 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 28 Jul 2017 12:53:06 -0300 perf annotate TUI: Use sym_hist_entry in disasm_line_samples Just paving the way to fix --show-total-period in the TUI, i.e. now we save in struct disasm_line_samples not just the number of samples, but also the total period. Based-on-a-patch-by: Taeung Song Cc: Jiri Olsa Cc: Milian Wolff Cc: Namhyung Kim Link: http://lkml.kernel.org/n/tip-1sup5hkwrxocjvrmrmhs732o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/browsers/annotate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index dbe4e63..680fff7 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c @@ -17,8 +17,8 @@ #include struct disasm_line_samples { - double percent; - u64 nr; + double percent; + struct sym_hist_entry he; }; #define IPC_WIDTH 6 @@ -152,7 +152,7 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int current_entry); if (annotate_browser__opts.show_total_period) { ui_browser__printf(browser, "%6" PRIu64 " ", - bdl->samples[i].nr); + bdl->samples[i].he.nr_samples); } else { ui_browser__printf(browser, "%6.2f ", bdl->samples[i].percent); @@ -457,7 +457,7 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser, pos->offset, next ? next->offset : len, &path, &sample); - bpos->samples[i].nr = sample.nr_samples; + bpos->samples[i].he = sample; if (max_percent < bpos->samples[i].percent) max_percent = bpos->samples[i].percent;