]> git.baikalelectronics.ru Git - kernel.git/commit
perf annotate: Allow 's' on source code lines
authorRiccardo Mancini <rickyman7@gmail.com>
Thu, 24 Jun 2021 22:34:22 +0000 (00:34 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 1 Jul 2021 19:14:38 +0000 (16:14 -0300)
commit0c4be3de6af9741f7e2135adb48772d5c5a24005
tree291d9399d26cf171691bf1b9cb409ea25eb3d203
parentfbcf4b4a73aab2eb57602667599c3d7a18aa3f07
perf annotate: Allow 's' on source code lines

In perf annotate, when 's' is pressed on a line containing source code,
it shows the message "Only available for assembly lines".

This patch gets rid of the error, moving the cursr to the next available
asm line (or the closest previous one if no asm line is found moving
forwards), before hiding source code lines.

Changes in v2:
 - handle case of no asm line found in
   annotate_browser__find_next_asm_line by returning NULL and
   handling error in caller.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Martin Liška <mliska@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210624223423.189550-1-rickyman7@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/ui/browsers/annotate.c