perf report: Fix broken arrow at row 0 in annotate view
PATCH 1/1 perf report: Fix broken arrow at row 0 in annotate view
When the jump instruction is displayed at the row 0 in annotate view, the arrow is broken. An example:
16.86 │ ┌──je 82
0.01 │ movsd (%rsp),%xmm0
│ movsd 0x8(%rsp),%xmm4
│ movsd 0x8(%rsp),%xmm1
│ movsd (%rsp),%xmm3
│ divsd %xmm4,%xmm0
│ divsd %xmm3,%xmm1
│ movsd (%rsp),%xmm2
│ addsd %xmm1,%xmm0
│ addsd %xmm2,%xmm0
│ movsd %xmm0,(%rsp)
│82: sub $0x1,%ebx
83.03 │ ↑ jne 38
│ add $0x10,%rsp
│ xor %eax,%eax
│ pop %rbx
│ ← retqThe patch increments the row number before checking with 0.
--- tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/ui/browser.c +1 -1
@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser,ui_browser__gotorc (browser, row, column +1 );SLsmg_draw_hline (2 ); -if (row++ ==0 ) +if (++row ==0 ) goto out; }else row =0 ;
Signature · 1 line
2.7.4
Hi Arnaldo,
Could this patch be merged?
Otherwise the jump arrow is broken when it's displayed at the row 0 in annotate view.
Thanks
Jin Yao
Quoted 41 lines · Jin Yao
When the jump instruction is displayed at the row 0 in annotate view, the arrow is broken. An example:
16.86 │ ┌──je 82 0.01 │ movsd (%rsp),%xmm0 │ movsd 0x8(%rsp),%xmm4 │ movsd 0x8(%rsp),%xmm1 │ movsd (%rsp),%xmm3 │ divsd %xmm4,%xmm0 │ divsd %xmm3,%xmm1 │ movsd (%rsp),%xmm2 │ addsd %xmm1,%xmm0 │ addsd %xmm2,%xmm0 │ movsd %xmm0,(%rsp) │82: sub $0x1,%ebx 83.03 │ ↑ jne 38 │ add $0x10,%rsp │ xor %eax,%eax │ pop %rbx │ ← retqThe patch increments the row number before checking with 0.
Signed-off-by Jin Yao <[email protected]>--- tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/ui/browser.c +1
-1@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser,ui_browser__gotorc (browser, row, column +1 );SLsmg_draw_hline (2 ); -if (row++ ==0 ) +if (++row ==0 ) goto out; }else row =0 ;
Arnaldo Carvalho de Melo
maintainerEm Fri, Jul 07, 2017 at 01:11:42PM +0800, Jin, Yao escreveu:
Quoted 3 lines
Hi Arnaldo,
Could this patch be merged?
I'll test this one and the v4 fused ins series, thanks for following this up!
- Arnaldo
Quoted 48 lines
Otherwise the jump arrow is broken when it's displayed at the row 0 in annotate view.
Thanks
Jin Yao
Quoted 40 lines · Jin Yao
When the jump instruction is displayed at the row 0 in annotate view, the arrow is broken. An example:
16.86 │ ┌──je 82 0.01 │ movsd (%rsp),%xmm0 │ movsd 0x8(%rsp),%xmm4 │ movsd 0x8(%rsp),%xmm1 │ movsd (%rsp),%xmm3 │ divsd %xmm4,%xmm0 │ divsd %xmm3,%xmm1 │ movsd (%rsp),%xmm2 │ addsd %xmm1,%xmm0 │ addsd %xmm2,%xmm0 │ movsd %xmm0,(%rsp) │82: sub $0x1,%ebx 83.03 │ ↑ jne 38 │ add $0x10,%rsp │ xor %eax,%eax │ pop %rbx │ ← retqThe patch increments the row number before checking with 0.
Signed-off-by Jin Yao <[email protected]>--- tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/ui/browser.c +1
-1@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser,ui_browser__gotorc (browser, row, column +1 );SLsmg_draw_hline (2 ); -if (row++ ==0 ) +if (++row ==0 ) goto out; }else row =0 ;
Arnaldo Carvalho de Melo
maintainerEm Thu, Jun 08, 2017 at 02:01:44PM +0800, Jin Yao escreveu:
Quoted 21 lines
When the jump instruction is displayed at the row 0 in annotate view, the arrow is broken. An example:
16.86 │ ┌──je 82 0.01 │ movsd (%rsp),%xmm0 │ movsd 0x8(%rsp),%xmm4 │ movsd 0x8(%rsp),%xmm1 │ movsd (%rsp),%xmm3 │ divsd %xmm4,%xmm0 │ divsd %xmm3,%xmm1 │ movsd (%rsp),%xmm2 │ addsd %xmm1,%xmm0 │ addsd %xmm2,%xmm0 │ movsd %xmm0,(%rsp) │82: sub $0x1,%ebx 83.03 │ ↑ jne 38 │ add $0x10,%rsp │ xor %eax,%eax │ pop %rbx │ ← retq
Quoted 1 line
The patch increments the row number before checking with 0.
Thanks, tested and applied!
- Arnaldo
tip-bot for Jin Yao
merge bot[tip:perf/urgent] perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target
In reply to Jin Yaoperf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target
Commit-ID: 80f62589fa52f530cffc50e78c0b5a2ae572d61e Gitweb: http://git.kernel.org/tip/80f62589fa52f530cffc50e78c0b5a2ae572d61e Author: Jin Yao <[email protected]> AuthorDate: Thu, 8 Jun 2017 14:01:44 +0800 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 10 Jul 2017 16:36:40 -0300
perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target
When the jump instruction is displayed at the row 0 in annotate view, the arrow is broken. An example:
16.86 │ ┌──je 82
0.01 │ movsd (%rsp),%xmm0
│ movsd 0x8(%rsp),%xmm4
│ movsd 0x8(%rsp),%xmm1
│ movsd (%rsp),%xmm3
│ divsd %xmm4,%xmm0
│ divsd %xmm3,%xmm1
│ movsd (%rsp),%xmm2
│ addsd %xmm1,%xmm0
│ addsd %xmm2,%xmm0
│ movsd %xmm0,(%rsp)
│82: sub $0x1,%ebx
83.03 │ ↑ jne 38
│ add $0x10,%rsp
│ xor %eax,%eax
│ pop %rbx
│ ← retqThe patch increments the row number before checking with 0.
--- tools/perf/ui/browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/ui/browser.c +1 -1
@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser,ui_browser__gotorc (browser, row, column +1 );SLsmg_draw_hline (2 ); -if (row++ ==0 ) +if (++row ==0 ) goto out; }else row =0 ;