Commit 63a1a3d8 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf hists browser: Fix off-by-two bug on the first column

The commit 5395a048 ("perf hists: Separate overhead and baseline
columns") makes the "Overhead" column no more the first one.  So it
resulted in the mis-aligned column in the normal (non-diff) output.
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Reported-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/NoneSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 88481b6b
...@@ -610,6 +610,7 @@ static int hist_browser__show_entry(struct hist_browser *browser, ...@@ -610,6 +610,7 @@ static int hist_browser__show_entry(struct hist_browser *browser,
char folded_sign = ' '; char folded_sign = ' ';
bool current_entry = ui_browser__is_current_entry(&browser->b, row); bool current_entry = ui_browser__is_current_entry(&browser->b, row);
off_t row_offset = entry->row_offset; off_t row_offset = entry->row_offset;
bool first = true;
if (current_entry) { if (current_entry) {
browser->he_selection = entry; browser->he_selection = entry;
...@@ -633,10 +634,11 @@ static int hist_browser__show_entry(struct hist_browser *browser, ...@@ -633,10 +634,11 @@ static int hist_browser__show_entry(struct hist_browser *browser,
if (!perf_hpp__format[i].cond) if (!perf_hpp__format[i].cond)
continue; continue;
if (i) { if (!first) {
slsmg_printf(" "); slsmg_printf(" ");
width -= 2; width -= 2;
} }
first = false;
if (perf_hpp__format[i].color) { if (perf_hpp__format[i].color) {
hpp.ptr = &percent; hpp.ptr = &percent;
......
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