From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Jiri Olsa <jolsa@redhat.com>,
Milian Wolff <milian.wolff@kdab.com>,
Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH 08/15] perf annotate TUI: Use sym_hist_entry in disasm_line_samples
Date: Fri, 28 Jul 2017 17:00:14 -0300 [thread overview]
Message-ID: <20170728200021.11389-9-acme@kernel.org> (raw)
In-Reply-To: <20170728200021.11389-1-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
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 <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-1sup5hkwrxocjvrmrmhs732o@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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 dbe4e630b90f..680fff70f7a0 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -17,8 +17,8 @@
#include <sys/ttydefaults.h>
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;
--
2.9.4
next prev parent reply other threads:[~2017-07-28 20:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-28 20:00 [GIT PULL 00/15] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 01/15] perf tools: Add perf_evsel__read_size function Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 02/15] perf evsel: Add read_counter() Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 03/15] perf stat: Use group read for event groups Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 04/15] perf annotate: Do not overwrite perf_sample->weight Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 05/15] perf sort: Use default sort if evlist is empty Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 06/15] perf annotate stdio: Set enough columns for --show-total-period Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 07/15] perf annotate: Fix storing per line sym_hist_entry Arnaldo Carvalho de Melo
2017-07-28 20:00 ` Arnaldo Carvalho de Melo [this message]
2017-07-28 20:00 ` [PATCH 09/15] perf annotate TUI: Fix --show-total-period Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 10/15] perf annotate TUI: Clarify calculation of column header widths Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 11/15] perf annotate TUI: Fix column header when toggling period/percent Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 12/15] perf annotate TUI: Set appropriate column width for period/percent Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 13/15] perf data: Add callchain to CTF conversion Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 14/15] perf data: Add mmap[2] events " Arnaldo Carvalho de Melo
2017-07-28 20:00 ` [PATCH 15/15] perf data: Add doc when no conversion support compiled Arnaldo Carvalho de Melo
2017-07-30 9:31 ` [GIT PULL 00/15] perf/core improvements and fixes Ingo Molnar
2017-07-30 9:37 ` [PATCH] perf build: Clarify header version warning message Ingo Molnar
2017-07-30 9:51 ` perf build: Clarify open-coded " Ingo Molnar
2017-07-30 9:52 ` tools/include: Sync kernel ABI headers with tooling headers Ingo Molnar
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=20170728200021.11389-9-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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;
as well as URLs for NNTP newsgroup(s).