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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent fa70b5d6
...@@ -63,6 +63,11 @@ static void hist_browser__refresh_dimensions(struct hist_browser *browser) ...@@ -63,6 +63,11 @@ static void hist_browser__refresh_dimensions(struct hist_browser *browser)
sizeof("[k]")); 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) 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 ...@@ -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__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_write_nstring(" ", offset + extra_offset);
slsmg_printf("%c ", folded_sign); slsmg_printf("%c ", folded_sign);
slsmg_write_nstring(str, width); slsmg_write_nstring(str, width);
...@@ -567,7 +572,7 @@ static int hist_browser__show_callchain_node(struct hist_browser *browser, ...@@ -567,7 +572,7 @@ static int hist_browser__show_callchain_node(struct hist_browser *browser,
s = callchain_list__sym_name(chain, bf, sizeof(bf), s = callchain_list__sym_name(chain, bf, sizeof(bf),
browser->show_dso); browser->show_dso);
ui_browser__gotorc(&browser->b, row, 0); hist_browser__gotorc(browser, row, 0);
ui_browser__set_color(&browser->b, color); ui_browser__set_color(&browser->b, color);
slsmg_write_nstring(" ", offset); slsmg_write_nstring(" ", offset);
slsmg_printf("%c ", folded_sign); slsmg_printf("%c ", folded_sign);
...@@ -732,7 +737,7 @@ static int hist_browser__show_entry(struct hist_browser *browser, ...@@ -732,7 +737,7 @@ static int hist_browser__show_entry(struct hist_browser *browser,
.ptr = &arg, .ptr = &arg,
}; };
ui_browser__gotorc(&browser->b, row, 0); hist_browser__gotorc(browser, row, 0);
perf_hpp__for_each_format(fmt) { perf_hpp__for_each_format(fmt) {
if (perf_hpp__should_skip(fmt)) if (perf_hpp__should_skip(fmt))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment