aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/ui/browsers/map.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-08-11 14:51:47 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-08-19 19:33:16 -0300
commit8f9bbc408b6f704e84d0ae78e6093005ad58d4fe (patch)
tree2202f2199ceecbc5935eeb333bd123f55247f5b8 /tools/perf/util/ui/browsers/map.c
parentMerge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core (diff)
downloadlinux-dev-8f9bbc408b6f704e84d0ae78e6093005ad58d4fe.tar.xz
linux-dev-8f9bbc408b6f704e84d0ae78e6093005ad58d4fe.zip
perf ui browser: Abstract some more slang operations
Browsers don't have to deal with absolute coordinates, just using (row, column) and leaving the rest to ui_browser is better and removes one more UI backend detail from the browsers. Also shorten the percent_color setting idiom, removing some more direct libslang calls. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ui/browsers/map.c')
-rw-r--r--tools/perf/util/ui/browsers/map.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/ui/browsers/map.c b/tools/perf/util/ui/browsers/map.c
index 142b825b42bf..733daba60cd4 100644
--- a/tools/perf/util/ui/browsers/map.c
+++ b/tools/perf/util/ui/browsers/map.c
@@ -56,9 +56,8 @@ static void map_browser__write(struct ui_browser *self, void *nd, int row)
struct symbol *sym = rb_entry(nd, struct symbol, rb_node);
struct map_browser *mb = container_of(self, struct map_browser, b);
bool current_entry = ui_browser__is_current_entry(self, row);
- int color = ui_browser__percent_color(0, current_entry);
- SLsmg_set_color(color);
+ ui_browser__set_percent_color(self, 0, current_entry);
slsmg_printf("%*llx %*llx %c ",
mb->addrlen, sym->start, mb->addrlen, sym->end,
sym->binding == STB_GLOBAL ? 'g' :