[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ab77df672cdbf7a0235a9de3289c173e2fce68e5@git.kernel.org>
Date: Thu, 21 Mar 2013 04:22:01 -0700
From: tip-bot for Namhyung Kim <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
hpa@...or.com, mingo@...nel.org, andi@...stfloor.org,
a.p.zijlstra@...llo.nl, penberg@...nel.org, namhyung.kim@....com,
namhyung@...nel.org, jolsa@...hat.com, tglx@...utronix.de
Subject: [tip:perf/core] perf annotate browser: Make browser_disasm_line->
percent an array
Commit-ID: ab77df672cdbf7a0235a9de3289c173e2fce68e5
Gitweb: http://git.kernel.org/tip/ab77df672cdbf7a0235a9de3289c173e2fce68e5
Author: Namhyung Kim <namhyung@...nel.org>
AuthorDate: Tue, 5 Mar 2013 14:53:29 +0900
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 15 Mar 2013 13:06:06 -0300
perf annotate browser: Make browser_disasm_line->percent an array
Make percent field of struct browser_disasm_line an array and move it to
the last. This is a preparation of event group view feature.
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung.kim@....com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Pekka Enberg <penberg@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1362462812-30885-10-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/ui/browsers/annotate.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index cfae57f..62369f0 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -14,10 +14,10 @@
struct browser_disasm_line {
struct rb_node rb_node;
- double percent;
u32 idx;
int idx_asm;
int jump_sources;
+ double percent[1];
};
static struct annotate_browser_opt {
@@ -97,9 +97,9 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
int width = browser->width, printed;
char bf[256];
- if (dl->offset != -1 && bdl->percent != 0.0) {
- ui_browser__set_percent_color(browser, bdl->percent, current_entry);
- slsmg_printf("%6.2f ", bdl->percent);
+ if (dl->offset != -1 && bdl->percent[0] != 0.0) {
+ ui_browser__set_percent_color(browser, bdl->percent[0], current_entry);
+ slsmg_printf("%6.2f ", bdl->percent[0]);
} else {
ui_browser__set_percent_color(browser, 0, current_entry);
slsmg_write_nstring(" ", 7);
@@ -283,7 +283,7 @@ static void disasm_rb_tree__insert(struct rb_root *root, struct browser_disasm_l
while (*p != NULL) {
parent = *p;
l = rb_entry(parent, struct browser_disasm_line, rb_node);
- if (bdl->percent < l->percent)
+ if (bdl->percent[0] < l->percent[0])
p = &(*p)->rb_left;
else
p = &(*p)->rb_right;
@@ -345,8 +345,8 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
list_for_each_entry(pos, ¬es->src->source, node) {
struct browser_disasm_line *bpos = disasm_line__browser(pos);
- bpos->percent = disasm_line__calc_percent(pos, sym, evsel->idx);
- if (bpos->percent < 0.01) {
+ bpos->percent[0] = disasm_line__calc_percent(pos, sym, evsel->idx);
+ if (bpos->percent[0] < 0.01) {
RB_CLEAR_NODE(&bpos->rb_node);
continue;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists