aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-07-01 15:42:24 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-07-07 11:36:54 -0400
commitca3ff33b5c2dc67daa8d4d130e3bd6231fcb3d14 (patch)
tree208035af7c8b0e8684aaaded4dbef37db86996b5 /tools/perf/ui
parentfa70b5d66d6e9de3331f57e434a16bc0eee980a8 (diff)
perf hists browser: Introduce gotorc method
That will allow us to add a row offset to open up space for the column headers. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> 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-otc3ployokfci5qi81o7jo22@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/hists.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index e16aff45b564..ca63564d203a 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -63,6 +63,11 @@ static void hist_browser__refresh_dimensions(struct hist_browser *browser)
63 sizeof("[k]")); 63 sizeof("[k]"));
64} 64}
65 65
66static void hist_browser__gotorc(struct hist_browser *browser, int row, int column)
67{
68 ui_browser__gotorc(&browser->b, row, column);
69}
70
66static void hist_browser__reset(struct hist_browser *browser) 71static void hist_browser__reset(struct hist_browser *browser)
67{ 72{
68 /* 73 /*
@@ -508,7 +513,7 @@ static int hist_browser__show_callchain_node_rb_tree(struct hist_browser *browse
508 } 513 }
509 514
510 ui_browser__set_color(&browser->b, color); 515 ui_browser__set_color(&browser->b, color);
511 ui_browser__gotorc(&browser->b, row, 0); 516 hist_browser__gotorc(browser, row, 0);
512 slsmg_write_nstring(" ", offset + extra_offset); 517 slsmg_write_nstring(" ", offset + extra_offset);
513 slsmg_printf("%c ", folded_sign); 518 slsmg_printf("%c ", folded_sign);
514 slsmg_write_nstring(str, width); 519 slsmg_write_nstring(str, width);
@@ -567,7 +572,7 @@ static int hist_browser__show_callchain_node(struct hist_browser *browser,
567 572
568 s = callchain_list__sym_name(chain, bf, sizeof(bf), 573 s = callchain_list__sym_name(chain, bf, sizeof(bf),
569 browser->show_dso); 574 browser->show_dso);
570 ui_browser__gotorc(&browser->b, row, 0); 575 hist_browser__gotorc(browser, row, 0);
571 ui_browser__set_color(&browser->b, color); 576 ui_browser__set_color(&browser->b, color);
572 slsmg_write_nstring(" ", offset); 577 slsmg_write_nstring(" ", offset);
573 slsmg_printf("%c ", folded_sign); 578 slsmg_printf("%c ", folded_sign);
@@ -732,7 +737,7 @@ static int hist_browser__show_entry(struct hist_browser *browser,
732 .ptr = &arg, 737 .ptr = &arg,
733 }; 738 };
734 739
735 ui_browser__gotorc(&browser->b, row, 0); 740 hist_browser__gotorc(browser, row, 0);
736 741
737 perf_hpp__for_each_format(fmt) { 742 perf_hpp__for_each_format(fmt) {
738 if (perf_hpp__should_skip(fmt)) 743 if (perf_hpp__should_skip(fmt))