* perf hists indicator off by two spaces
@ 2012-10-14 19:50 Markus Trippelsdorf
2012-10-15 2:33 ` [PATCH] perf ui/browser: Fix off-by-two bug on the first column Namhyung Kim
0 siblings, 1 reply; 3+ messages in thread
From: Markus Trippelsdorf @ 2012-10-14 19:50 UTC (permalink / raw)
To: linux-kernel, jolsa
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
The indicator line in perf hist is off by two spaces and wraps around to
the following line. See attached screenshot.
This started with:
commit 5395a04841fcdd9220177f2c21353fe6d4cd0729
Author: Jiri Olsa <jolsa@redhat.com>
Date: Thu Oct 4 21:49:37 2012 +0900
perf hists: Separate overhead and baseline columns
--
Markus
[-- Attachment #2: screenshot.png --]
[-- Type: image/png, Size: 47123 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] perf ui/browser: Fix off-by-two bug on the first column
2012-10-14 19:50 perf hists indicator off by two spaces Markus Trippelsdorf
@ 2012-10-15 2:33 ` Namhyung Kim
2012-10-15 9:57 ` Jiri Olsa
0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2012-10-15 2:33 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, LKML, Namhyung Kim,
Jiri Olsa
From: Namhyung Kim <namhyung.kim@lge.com>
The commit 5395a04841fc ("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.
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/ui/browsers/hists.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 0568536ecf67..fe4430aed635 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -610,6 +610,7 @@ static int hist_browser__show_entry(struct hist_browser *browser,
char folded_sign = ' ';
bool current_entry = ui_browser__is_current_entry(&browser->b, row);
off_t row_offset = entry->row_offset;
+ bool first = true;
if (current_entry) {
browser->he_selection = entry;
@@ -633,10 +634,11 @@ static int hist_browser__show_entry(struct hist_browser *browser,
if (!perf_hpp__format[i].cond)
continue;
- if (i) {
+ if (!first) {
slsmg_printf(" ");
width -= 2;
}
+ first = false;
if (perf_hpp__format[i].color) {
hpp.ptr = &percent;
--
1.7.11.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf ui/browser: Fix off-by-two bug on the first column
2012-10-15 2:33 ` [PATCH] perf ui/browser: Fix off-by-two bug on the first column Namhyung Kim
@ 2012-10-15 9:57 ` Jiri Olsa
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2012-10-15 9:57 UTC (permalink / raw)
To: Namhyung Kim
Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Paul Mackerras,
Ingo Molnar, LKML, Namhyung Kim
On Mon, Oct 15, 2012 at 11:33:58AM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@lge.com>
>
> The commit 5395a04841fc ("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.
>
> Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
eek, missed that one ;) thanks!
Acked-by: Jiri Olsa <jolsa@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-15 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-14 19:50 perf hists indicator off by two spaces Markus Trippelsdorf
2012-10-15 2:33 ` [PATCH] perf ui/browser: Fix off-by-two bug on the first column Namhyung Kim
2012-10-15 9:57 ` Jiri Olsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox