summaryrefslogtreecommitdiffstats
path: root/tools/perf/ui
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-04-20 19:38:46 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-20 19:38:46 +0200
commitc7e6ead7347813b5833efb9b32908c08ff131259 (patch)
tree4cd53ffe880c0cf15ee9539682623f5aed8f4378 /tools/perf/ui
parentperf annotate: Add missing jump variants (diff)
downloadlinux-c7e6ead7347813b5833efb9b32908c08ff131259.tar.xz
linux-c7e6ead7347813b5833efb9b32908c08ff131259.zip
perf annotate: Group operands members
So that the ins_ops can handle them in a single place, instead of adding more and more functions or ins_ops parameters. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-pk4dqaum6ftiz104dvimwgtb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r--tools/perf/ui/browsers/annotate.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index e760326efca0..9c7b6d87822e 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -113,13 +113,12 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
if (change_color)
ui_browser__set_color(self, color);
if (dl->ins && dl->ins->ops->scnprintf) {
- dl->ins->ops->scnprintf(dl->ins, bf, sizeof(bf),
- !ab->use_offset ? dl->operands : NULL,
- dl->target);
+ dl->ins->ops->scnprintf(dl->ins, bf, sizeof(bf), &dl->ops,
+ !ab->use_offset);
slsmg_write_nstring(" ", 2);
printed += 2;
} else
- scnprintf(bf, sizeof(bf), " %-6.6s %s", dl->name, dl->operands);
+ scnprintf(bf, sizeof(bf), " %-6.6s %s", dl->name, dl->ops.raw);
slsmg_write_nstring(bf, width - 10 - printed);
}
@@ -294,7 +293,7 @@ static bool annotate_browser__callq(struct annotate_browser *browser,
if (!ins__is_call(dl->ins))
return false;
- ip = ms->map->map_ip(ms->map, dl->target);
+ ip = ms->map->map_ip(ms->map, dl->ops.target);
target = map__find_symbol(ms->map, ip, NULL);
if (target == NULL) {
ui_helpline__puts("The called function was not found.");
@@ -345,7 +344,7 @@ static bool annotate_browser__jump(struct annotate_browser *browser)
if (!ins__is_jump(dl->ins))
return false;
- dl = annotate_browser__find_offset(browser, dl->target, &idx);
+ dl = annotate_browser__find_offset(browser, dl->ops.target, &idx);
if (dl == NULL) {
ui_helpline__puts("Invallid jump offset");
return true;
@@ -621,14 +620,14 @@ static void annotate_browser__mark_jump_targets(struct annotate_browser *browser
if (!dl || !dl->ins || !ins__is_jump(dl->ins))
continue;
- if (dl->target >= size) {
+ if (dl->ops.target >= size) {
ui__error("jump to after symbol!\n"
"size: %zx, jump target: %" PRIx64,
- size, dl->target);
+ size, dl->ops.target);
continue;
}
- dlt = browser->offsets[dl->target];
+ dlt = browser->offsets[dl->ops.target];
bdlt = disasm_line__browser(dlt);
bdlt->jump_target = true;
}