linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] perf annotate: Handle more instructions on x86
@ 2023-05-11  6:27 Namhyung Kim
  2023-05-11  6:27 ` [PATCH 2/3] perf annotate: Parse x86 SIB addressing properly Namhyung Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Namhyung Kim @ 2023-05-11  6:27 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ian Rogers, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users, Andi Kleen

I found some instructions didn't parse the operands properly.
Add them to the table to fix the issue.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/arch/x86/annotate/instructions.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/x86/annotate/instructions.c
index 305872692bfd..5c7bec25fee4 100644
--- a/tools/perf/arch/x86/annotate/instructions.c
+++ b/tools/perf/arch/x86/annotate/instructions.c
@@ -35,12 +35,14 @@ static struct ins x86__instructions[] = {
 	{ .name = "cs",		.ops = &mov_ops,  },
 	{ .name = "dec",	.ops = &dec_ops,  },
 	{ .name = "decl",	.ops = &dec_ops,  },
+	{ .name = "decq",	.ops = &dec_ops,  },
 	{ .name = "divsd",	.ops = &mov_ops,  },
 	{ .name = "divss",	.ops = &mov_ops,  },
 	{ .name = "gs",		.ops = &mov_ops,  },
 	{ .name = "imul",	.ops = &mov_ops,  },
 	{ .name = "inc",	.ops = &dec_ops,  },
 	{ .name = "incl",	.ops = &dec_ops,  },
+	{ .name = "incq",	.ops = &dec_ops,  },
 	{ .name = "ja",		.ops = &jump_ops, },
 	{ .name = "jae",	.ops = &jump_ops, },
 	{ .name = "jb",		.ops = &jump_ops, },
@@ -123,6 +125,8 @@ static struct ins x86__instructions[] = {
 	{ .name = "test",	.ops = &mov_ops,  },
 	{ .name = "testb",	.ops = &mov_ops,  },
 	{ .name = "testl",	.ops = &mov_ops,  },
+	{ .name = "testq",	.ops = &mov_ops,  },
+	{ .name = "tzcnt",	.ops = &mov_ops,  },
 	{ .name = "ucomisd",	.ops = &mov_ops,  },
 	{ .name = "ucomiss",	.ops = &mov_ops,  },
 	{ .name = "vaddsd",	.ops = &mov_ops,  },
-- 
2.40.1.521.gf1e218fcd8-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] perf annotate: Parse x86 SIB addressing properly
  2023-05-11  6:27 [PATCH 1/3] perf annotate: Handle more instructions on x86 Namhyung Kim
@ 2023-05-11  6:27 ` Namhyung Kim
  2023-05-15 17:08   ` Ian Rogers
  2023-05-11  6:27 ` [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation Namhyung Kim
  2023-05-15 17:08 ` [PATCH 1/3] perf annotate: Handle more instructions on x86 Ian Rogers
  2 siblings, 1 reply; 8+ messages in thread
From: Namhyung Kim @ 2023-05-11  6:27 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ian Rogers, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users, Andi Kleen

When the source argument of mov instruction is look like below, it didn't
parse the whole operand and just stopped at the first comma.

  mov    (%rbx,%rax,1),%rcx

Fix it by checking the parentheses and move it to the closing one.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/annotate.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index ca9f0add68f4..6053ddf9c32d 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -550,6 +550,19 @@ static int mov__parse(struct arch *arch, struct ins_operands *ops, struct map_sy
 		return -1;
 
 	*s = '\0';
+
+	/*
+	 * x86 SIB addressing has something like 0x8(%rax, %rcx, 1)
+	 * then it needs to have the closing parenthesis.
+	 */
+	if (strchr(ops->raw, '(')) {
+		*s = ',';
+		s = strchr(ops->raw, ')');
+		if (s == NULL || s[1] != ',')
+			return -1;
+		*++s = '\0';
+	}
+
 	ops->source.raw = strdup(ops->raw);
 	*s = ',';
 
-- 
2.40.1.521.gf1e218fcd8-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation
  2023-05-11  6:27 [PATCH 1/3] perf annotate: Handle more instructions on x86 Namhyung Kim
  2023-05-11  6:27 ` [PATCH 2/3] perf annotate: Parse x86 SIB addressing properly Namhyung Kim
@ 2023-05-11  6:27 ` Namhyung Kim
  2023-05-15 17:09   ` Ian Rogers
  2023-05-15 17:08 ` [PATCH 1/3] perf annotate: Handle more instructions on x86 Ian Rogers
  2 siblings, 1 reply; 8+ messages in thread
From: Namhyung Kim @ 2023-05-11  6:27 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ian Rogers, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users, Andi Kleen

The hists__find_annotations() allow to move to next or previous symbols
for annotation using the arrow keys.  But TUI annotate_browser__run()
uses the RIGHT key as ENTER to handle jump/call instructions.  That
makes the navigation to the next function impossible.

I'd like to change it back to move the next symbol but I'm afraid if
some users get confused.  So I added a new pair of keys to handle that.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-annotate.c     | 4 +++-
 tools/perf/ui/browsers/annotate.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 63cdf6ea6f6d..425a7e2fd6fb 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -342,7 +342,7 @@ static void hists__find_annotations(struct hists *hists,
 		notes = symbol__annotation(he->ms.sym);
 		if (notes->src == NULL) {
 find_next:
-			if (key == K_LEFT)
+			if (key == K_LEFT || key == '<')
 				nd = rb_prev(nd);
 			else
 				nd = rb_next(nd);
@@ -378,9 +378,11 @@ static void hists__find_annotations(struct hists *hists,
 					return;
 				/* fall through */
 			case K_RIGHT:
+			case '>':
 				next = rb_next(nd);
 				break;
 			case K_LEFT:
+			case '<':
 				next = rb_prev(nd);
 				break;
 			default:
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 12c3ce530e42..70bad42b807b 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -781,9 +781,9 @@ static int annotate_browser__run(struct annotate_browser *browser,
 			ui_browser__help_window(&browser->b,
 		"UP/DOWN/PGUP\n"
 		"PGDN/SPACE    Navigate\n"
+		"</>           Move to prev/next symbol\n"
 		"q/ESC/CTRL+C  Exit\n\n"
 		"ENTER         Go to target\n"
-		"ESC           Exit\n"
 		"H             Go to hottest instruction\n"
 		"TAB/shift+TAB Cycle thru hottest instructions\n"
 		"j             Toggle showing jump to target arrows\n"
@@ -913,6 +913,8 @@ static int annotate_browser__run(struct annotate_browser *browser,
 			annotation__toggle_full_addr(notes, ms);
 			continue;
 		case K_LEFT:
+		case '<':
+		case '>':
 		case K_ESC:
 		case 'q':
 		case CTRL('c'):
-- 
2.40.1.521.gf1e218fcd8-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] perf annotate: Handle more instructions on x86
  2023-05-11  6:27 [PATCH 1/3] perf annotate: Handle more instructions on x86 Namhyung Kim
  2023-05-11  6:27 ` [PATCH 2/3] perf annotate: Parse x86 SIB addressing properly Namhyung Kim
  2023-05-11  6:27 ` [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation Namhyung Kim
@ 2023-05-15 17:08 ` Ian Rogers
  2 siblings, 0 replies; 8+ messages in thread
From: Ian Rogers @ 2023-05-15 17:08 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users, Andi Kleen

On Wed, May 10, 2023 at 11:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> I found some instructions didn't parse the operands properly.
> Add them to the table to fix the issue.
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Acked-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/arch/x86/annotate/instructions.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/x86/annotate/instructions.c
> index 305872692bfd..5c7bec25fee4 100644
> --- a/tools/perf/arch/x86/annotate/instructions.c
> +++ b/tools/perf/arch/x86/annotate/instructions.c
> @@ -35,12 +35,14 @@ static struct ins x86__instructions[] = {
>         { .name = "cs",         .ops = &mov_ops,  },
>         { .name = "dec",        .ops = &dec_ops,  },
>         { .name = "decl",       .ops = &dec_ops,  },
> +       { .name = "decq",       .ops = &dec_ops,  },
>         { .name = "divsd",      .ops = &mov_ops,  },
>         { .name = "divss",      .ops = &mov_ops,  },
>         { .name = "gs",         .ops = &mov_ops,  },
>         { .name = "imul",       .ops = &mov_ops,  },
>         { .name = "inc",        .ops = &dec_ops,  },
>         { .name = "incl",       .ops = &dec_ops,  },
> +       { .name = "incq",       .ops = &dec_ops,  },
>         { .name = "ja",         .ops = &jump_ops, },
>         { .name = "jae",        .ops = &jump_ops, },
>         { .name = "jb",         .ops = &jump_ops, },
> @@ -123,6 +125,8 @@ static struct ins x86__instructions[] = {
>         { .name = "test",       .ops = &mov_ops,  },
>         { .name = "testb",      .ops = &mov_ops,  },
>         { .name = "testl",      .ops = &mov_ops,  },
> +       { .name = "testq",      .ops = &mov_ops,  },
> +       { .name = "tzcnt",      .ops = &mov_ops,  },
>         { .name = "ucomisd",    .ops = &mov_ops,  },
>         { .name = "ucomiss",    .ops = &mov_ops,  },
>         { .name = "vaddsd",     .ops = &mov_ops,  },
> --
> 2.40.1.521.gf1e218fcd8-goog
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] perf annotate: Parse x86 SIB addressing properly
  2023-05-11  6:27 ` [PATCH 2/3] perf annotate: Parse x86 SIB addressing properly Namhyung Kim
@ 2023-05-15 17:08   ` Ian Rogers
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Rogers @ 2023-05-15 17:08 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users, Andi Kleen

On Wed, May 10, 2023 at 11:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> When the source argument of mov instruction is look like below, it didn't
> parse the whole operand and just stopped at the first comma.
>
>   mov    (%rbx,%rax,1),%rcx
>
> Fix it by checking the parentheses and move it to the closing one.
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Acked-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/util/annotate.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index ca9f0add68f4..6053ddf9c32d 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -550,6 +550,19 @@ static int mov__parse(struct arch *arch, struct ins_operands *ops, struct map_sy
>                 return -1;
>
>         *s = '\0';
> +
> +       /*
> +        * x86 SIB addressing has something like 0x8(%rax, %rcx, 1)
> +        * then it needs to have the closing parenthesis.
> +        */
> +       if (strchr(ops->raw, '(')) {
> +               *s = ',';
> +               s = strchr(ops->raw, ')');
> +               if (s == NULL || s[1] != ',')
> +                       return -1;
> +               *++s = '\0';
> +       }
> +
>         ops->source.raw = strdup(ops->raw);
>         *s = ',';
>
> --
> 2.40.1.521.gf1e218fcd8-goog
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation
  2023-05-11  6:27 ` [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation Namhyung Kim
@ 2023-05-15 17:09   ` Ian Rogers
  2023-05-15 20:54     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 8+ messages in thread
From: Ian Rogers @ 2023-05-15 17:09 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Adrian Hunter,
	Peter Zijlstra, Ingo Molnar, LKML, linux-perf-users, Andi Kleen

On Wed, May 10, 2023 at 11:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> The hists__find_annotations() allow to move to next or previous symbols
> for annotation using the arrow keys.  But TUI annotate_browser__run()
> uses the RIGHT key as ENTER to handle jump/call instructions.  That
> makes the navigation to the next function impossible.
>
> I'd like to change it back to move the next symbol but I'm afraid if
> some users get confused.  So I added a new pair of keys to handle that.
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Acked-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/builtin-annotate.c     | 4 +++-
>  tools/perf/ui/browsers/annotate.c | 4 +++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
> index 63cdf6ea6f6d..425a7e2fd6fb 100644
> --- a/tools/perf/builtin-annotate.c
> +++ b/tools/perf/builtin-annotate.c
> @@ -342,7 +342,7 @@ static void hists__find_annotations(struct hists *hists,
>                 notes = symbol__annotation(he->ms.sym);
>                 if (notes->src == NULL) {
>  find_next:
> -                       if (key == K_LEFT)
> +                       if (key == K_LEFT || key == '<')
>                                 nd = rb_prev(nd);
>                         else
>                                 nd = rb_next(nd);
> @@ -378,9 +378,11 @@ static void hists__find_annotations(struct hists *hists,
>                                         return;
>                                 /* fall through */
>                         case K_RIGHT:
> +                       case '>':
>                                 next = rb_next(nd);
>                                 break;
>                         case K_LEFT:
> +                       case '<':
>                                 next = rb_prev(nd);
>                                 break;
>                         default:
> diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
> index 12c3ce530e42..70bad42b807b 100644
> --- a/tools/perf/ui/browsers/annotate.c
> +++ b/tools/perf/ui/browsers/annotate.c
> @@ -781,9 +781,9 @@ static int annotate_browser__run(struct annotate_browser *browser,
>                         ui_browser__help_window(&browser->b,
>                 "UP/DOWN/PGUP\n"
>                 "PGDN/SPACE    Navigate\n"
> +               "</>           Move to prev/next symbol\n"
>                 "q/ESC/CTRL+C  Exit\n\n"
>                 "ENTER         Go to target\n"
> -               "ESC           Exit\n"
>                 "H             Go to hottest instruction\n"
>                 "TAB/shift+TAB Cycle thru hottest instructions\n"
>                 "j             Toggle showing jump to target arrows\n"
> @@ -913,6 +913,8 @@ static int annotate_browser__run(struct annotate_browser *browser,
>                         annotation__toggle_full_addr(notes, ms);
>                         continue;
>                 case K_LEFT:
> +               case '<':
> +               case '>':
>                 case K_ESC:
>                 case 'q':
>                 case CTRL('c'):
> --
> 2.40.1.521.gf1e218fcd8-goog
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation
  2023-05-15 17:09   ` Ian Rogers
@ 2023-05-15 20:54     ` Arnaldo Carvalho de Melo
  2023-05-15 20:55       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-05-15 20:54 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Namhyung Kim, Jiri Olsa, Adrian Hunter, Peter Zijlstra,
	Ingo Molnar, LKML, linux-perf-users, Andi Kleen

Em Mon, May 15, 2023 at 10:09:08AM -0700, Ian Rogers escreveu:
> On Wed, May 10, 2023 at 11:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > The hists__find_annotations() allow to move to next or previous symbols
> > for annotation using the arrow keys.  But TUI annotate_browser__run()
> > uses the RIGHT key as ENTER to handle jump/call instructions.  That
> > makes the navigation to the next function impossible.
> >
> > I'd like to change it back to move the next symbol but I'm afraid if
> > some users get confused.  So I added a new pair of keys to handle that.
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> 
> Acked-by: Ian Rogers <irogers@google.com>
> 
> Thanks,
> Ian
> 
> > ---
> >  tools/perf/builtin-annotate.c     | 4 +++-
> >  tools/perf/ui/browsers/annotate.c | 4 +++-
> >  2 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
> > index 63cdf6ea6f6d..425a7e2fd6fb 100644
> > --- a/tools/perf/builtin-annotate.c
> > +++ b/tools/perf/builtin-annotate.c
> > @@ -342,7 +342,7 @@ static void hists__find_annotations(struct hists *hists,
> >                 notes = symbol__annotation(he->ms.sym);
> >                 if (notes->src == NULL) {
> >  find_next:
> > -                       if (key == K_LEFT)
> > +                       if (key == K_LEFT || key == '<')
> >                                 nd = rb_prev(nd);
> >                         else
> >                                 nd = rb_next(nd);
> > @@ -378,9 +378,11 @@ static void hists__find_annotations(struct hists *hists,
> >                                         return;
> >                                 /* fall through */
> >                         case K_RIGHT:
> > +                       case '>':
> >                                 next = rb_next(nd);
> >                                 break;
> >                         case K_LEFT:
> > +                       case '<':
> >                                 next = rb_prev(nd);
> >                                 break;
> >                         default:
> > diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
> > index 12c3ce530e42..70bad42b807b 100644
> > --- a/tools/perf/ui/browsers/annotate.c
> > +++ b/tools/perf/ui/browsers/annotate.c
> > @@ -781,9 +781,9 @@ static int annotate_browser__run(struct annotate_browser *browser,
> >                         ui_browser__help_window(&browser->b,
> >                 "UP/DOWN/PGUP\n"
> >                 "PGDN/SPACE    Navigate\n"
> > +               "</>           Move to prev/next symbol\n"
> >                 "q/ESC/CTRL+C  Exit\n\n"
> >                 "ENTER         Go to target\n"
> > -               "ESC           Exit\n"

I think the two above were unintentional? I'm removing this hunk.

- Arnaldo

> >                 "H             Go to hottest instruction\n"
> >                 "TAB/shift+TAB Cycle thru hottest instructions\n"
> >                 "j             Toggle showing jump to target arrows\n"
> > @@ -913,6 +913,8 @@ static int annotate_browser__run(struct annotate_browser *browser,
> >                         annotation__toggle_full_addr(notes, ms);
> >                         continue;
> >                 case K_LEFT:
> > +               case '<':
> > +               case '>':
> >                 case K_ESC:
> >                 case 'q':
> >                 case CTRL('c'):
> > --
> > 2.40.1.521.gf1e218fcd8-goog
> >

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation
  2023-05-15 20:54     ` Arnaldo Carvalho de Melo
@ 2023-05-15 20:55       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-05-15 20:55 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Namhyung Kim, Jiri Olsa, Adrian Hunter, Peter Zijlstra,
	Ingo Molnar, LKML, linux-perf-users, Andi Kleen

Em Mon, May 15, 2023 at 05:54:19PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, May 15, 2023 at 10:09:08AM -0700, Ian Rogers escreveu:
> > On Wed, May 10, 2023 at 11:27 PM Namhyung Kim <namhyung@kernel.org> wrote:
> > >
> > > The hists__find_annotations() allow to move to next or previous symbols
> > > for annotation using the arrow keys.  But TUI annotate_browser__run()
> > > uses the RIGHT key as ENTER to handle jump/call instructions.  That
> > > makes the navigation to the next function impossible.
> > >
> > > I'd like to change it back to move the next symbol but I'm afraid if
> > > some users get confused.  So I added a new pair of keys to handle that.
> > >
> > > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > 
> > Acked-by: Ian Rogers <irogers@google.com>
> > 
> > Thanks,
> > Ian
> > 
> > > ---
> > >  tools/perf/builtin-annotate.c     | 4 +++-
> > >  tools/perf/ui/browsers/annotate.c | 4 +++-
> > >  2 files changed, 6 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
> > > index 63cdf6ea6f6d..425a7e2fd6fb 100644
> > > --- a/tools/perf/builtin-annotate.c
> > > +++ b/tools/perf/builtin-annotate.c
> > > @@ -342,7 +342,7 @@ static void hists__find_annotations(struct hists *hists,
> > >                 notes = symbol__annotation(he->ms.sym);
> > >                 if (notes->src == NULL) {
> > >  find_next:
> > > -                       if (key == K_LEFT)
> > > +                       if (key == K_LEFT || key == '<')
> > >                                 nd = rb_prev(nd);
> > >                         else
> > >                                 nd = rb_next(nd);
> > > @@ -378,9 +378,11 @@ static void hists__find_annotations(struct hists *hists,
> > >                                         return;
> > >                                 /* fall through */
> > >                         case K_RIGHT:
> > > +                       case '>':
> > >                                 next = rb_next(nd);
> > >                                 break;
> > >                         case K_LEFT:
> > > +                       case '<':
> > >                                 next = rb_prev(nd);
> > >                                 break;
> > >                         default:
> > > diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
> > > index 12c3ce530e42..70bad42b807b 100644
> > > --- a/tools/perf/ui/browsers/annotate.c
> > > +++ b/tools/perf/ui/browsers/annotate.c
> > > @@ -781,9 +781,9 @@ static int annotate_browser__run(struct annotate_browser *browser,
> > >                         ui_browser__help_window(&browser->b,
> > >                 "UP/DOWN/PGUP\n"
> > >                 "PGDN/SPACE    Navigate\n"
> > > +               "</>           Move to prev/next symbol\n"
> > >                 "q/ESC/CTRL+C  Exit\n\n"
> > >                 "ENTER         Go to target\n"
> > > -               "ESC           Exit\n"
> 
> I think the two above were unintentional? I'm removing this hunk.

Humm I see, its a dup, will keep it.

- Arnaldo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-15 20:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11  6:27 [PATCH 1/3] perf annotate: Handle more instructions on x86 Namhyung Kim
2023-05-11  6:27 ` [PATCH 2/3] perf annotate: Parse x86 SIB addressing properly Namhyung Kim
2023-05-15 17:08   ` Ian Rogers
2023-05-11  6:27 ` [PATCH 3/3] perf annotate browser: Add '<' and '>' keys for navigation Namhyung Kim
2023-05-15 17:09   ` Ian Rogers
2023-05-15 20:54     ` Arnaldo Carvalho de Melo
2023-05-15 20:55       ` Arnaldo Carvalho de Melo
2023-05-15 17:08 ` [PATCH 1/3] perf annotate: Handle more instructions on x86 Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).