From: Arnaldo Carvalho de Melo Date: Tue, 1 Jul 2014 19:42:24 +0000 (-0300) Subject: perf hists browser: Introduce gotorc method X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ca3ff33b5c2dc67daa8d4d130e3bd6231fcb3d14;p=linux-beck.git 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 Cc: David Ahern Cc: Don Zickus Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-otc3ployokfci5qi81o7jo22@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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) sizeof("[k]")); } +static void hist_browser__gotorc(struct hist_browser *browser, int row, int column) +{ + ui_browser__gotorc(&browser->b, row, column); +} + static void hist_browser__reset(struct hist_browser *browser) { /* @@ -508,7 +513,7 @@ static int hist_browser__show_callchain_node_rb_tree(struct hist_browser *browse } ui_browser__set_color(&browser->b, color); - ui_browser__gotorc(&browser->b, row, 0); + hist_browser__gotorc(browser, row, 0); slsmg_write_nstring(" ", offset + extra_offset); slsmg_printf("%c ", folded_sign); slsmg_write_nstring(str, width); @@ -567,7 +572,7 @@ static int hist_browser__show_callchain_node(struct hist_browser *browser, s = callchain_list__sym_name(chain, bf, sizeof(bf), browser->show_dso); - ui_browser__gotorc(&browser->b, row, 0); + hist_browser__gotorc(browser, row, 0); ui_browser__set_color(&browser->b, color); slsmg_write_nstring(" ", offset); slsmg_printf("%c ", folded_sign); @@ -732,7 +737,7 @@ static int hist_browser__show_entry(struct hist_browser *browser, .ptr = &arg, }; - ui_browser__gotorc(&browser->b, row, 0); + hist_browser__gotorc(browser, row, 0); perf_hpp__for_each_format(fmt) { if (perf_hpp__should_skip(fmt))