perf top/report TUI: Provide visual cue when starting annotation
Arnaldo Carvalho de Melo
maintainerPATCH 1/1 perf top/report TUI: Provide visual cue when starting annotation
Sometimes it takes a while for the annotation to be presented after pressing 'a' in the 'perf top'/'report' TUI, provide a visual cue informing that the annotation has started for that symbol.
This is the quick and most of the time improvement, but for some cases its better to improve on it by having a cancellable progress bar, which is now in my TODO list.
--- tools/perf/ui/browsers/annotate.c | 2 ++ 1 file changed, 2 insertions(+)
tools/perf/ui/browsers/annotate.c +2 -0
@@ -2,6 +2,7 @@#include "../browser.h" #include "../helpline.h" #include "../ui.h" +#include "../util.h" #include "../../util/annotate.h" #include "../../util/debug.h" #include "../../util/debuginfo.h"
@@ -1016,6 +1017,7 @@ int __hist_entry__tui_annotate(struct hist_entry *he, struct map_symbol *ms,return -1 ;if (not_annotated || !sym->annotate2) { +ui__info_window ("Annotating" , sym->name); err =symbol__annotate2 (ms, evsel, &browser.arch);if (err) {char msg[BUFSIZ ];
Signature · 1 line
2.49.0
Namhyung Kim
maintainerQuoted 3 lines · Arnaldo Carvalho de Melo
Sometimes it takes a while for the annotation to be presented after pressing 'a' in the 'perf top'/'report' TUI, provide a visual cue informing that the annotation has started for that symbol.
It's probably because objdump takes long to process DWARF. I think I need to update this.
https://lore.kernel.org/linux-perf-users/[email protected]/
Thanks,
Namhyung
Quoted 40 lines
This is the quick and most of the time improvement, but for some cases its better to improve on it by having a cancellable progress bar, which is now in my TODO list.
Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc Ingo Molnar <[email protected]>Cc James Clark <[email protected]>Cc Jiri Olsa <[email protected]>Cc Kan Liang <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/ui/browsers/annotate.c | 2 ++ 1 file changed, 2 insertions(+)tools/perf/ui/browsers/annotate.c +2
-0@@ -2,6 +2,7 @@#include "../browser.h" #include "../helpline.h" #include "../ui.h" +#include "../util.h" #include "../../util/annotate.h" #include "../../util/debug.h" #include "../../util/debuginfo.h" @@ -1016,6 +1017,7 @@ int __hist_entry__tui_annotate(struct hist_entry *he, struct map_symbol *ms,return -1 ;if (not_annotated || !sym->annotate2) { +ui__info_window ("Annotating" , sym->name); err =symbol__annotate2 (ms, evsel, &browser.arch);if (err) {char msg[BUFSIZ ];Signature · 1 line
2.49.0
Arnaldo Carvalho de Melo
maintainerQuoted 9 lines · Namhyung Kim
Quoted 3 lines · Arnaldo Carvalho de Melo
Sometimes it takes a while for the annotation to be presented after pressing 'a' in the 'perf top'/'report' TUI, provide a visual cue informing that the annotation has started for that symbol.
It's probably because objdump takes long to process DWARF. I think I need to update this.
Humm, in this case I had explicitely asked for using objdump:
root@number:~# cat ~/.perfconfig # this file is auto-generated. [annotate] disassemblers = objdump root@number:~#
So, yeah, its objdump running but in my case there was no DWARF involved, it was just a big C++ app, so the ELF files were big and objdump takes a long time even without DWARF.
One way or the other, your patch switching to use objdump when 's' is pressed is a good one, please update it :-)
- Arnaldo
Quoted 43 lines
Thanks,
NamhyungQuoted 40 lines
This is the quick and most of the time improvement, but for some cases its better to improve on it by having a cancellable progress bar, which is now in my TODO list.
Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc Ingo Molnar <[email protected]>Cc James Clark <[email protected]>Cc Jiri Olsa <[email protected]>Cc Kan Liang <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/ui/browsers/annotate.c | 2 ++ 1 file changed, 2 insertions(+)tools/perf/ui/browsers/annotate.c +2
-0@@ -2,6 +2,7 @@#include "../browser.h" #include "../helpline.h" #include "../ui.h" +#include "../util.h" #include "../../util/annotate.h" #include "../../util/debug.h" #include "../../util/debuginfo.h" @@ -1016,6 +1017,7 @@ int __hist_entry__tui_annotate(struct hist_entry *he, struct map_symbol *ms,return -1 ;if (not_annotated || !sym->annotate2) { +ui__info_window ("Annotating" , sym->name); err =symbol__annotate2 (ms, evsel, &browser.arch);if (err) {char msg[BUFSIZ ];Signature · 1 line
2.49.0
Namhyung Kim
maintainerQuoted 19 lines · Arnaldo Carvalho de Melo
Quoted 9 lines · Namhyung Kim
Quoted 3 lines · Arnaldo Carvalho de Melo
Sometimes it takes a while for the annotation to be presented after pressing 'a' in the 'perf top'/'report' TUI, provide a visual cue informing that the annotation has started for that symbol.
It's probably because objdump takes long to process DWARF. I think I need to update this.
Humm, in this case I had explicitely asked for using objdump:
root@number:~# cat ~/.perfconfig # this file is auto-generated. [annotate] disassemblers = objdump root@number:~#
Quoted 3 lines
So, yeah, its objdump running but in my case there was no DWARF involved, it was just a big C++ app, so the ELF files were big and objdump takes a long time even without DWARF.
Oh, ok. I had a problem with DWARF in the past, so assumed the same.
Quoted 3 lines
One way or the other, your patch switching to use objdump when 's' is pressed is a good one, please update it :-)
Sure, will do it soon.
Thanks,
Namhyung
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
This is the quick and most of the time improvement, but for some cases its better to improve on it by having a cancellable progress bar, which is now in my TODO list.
Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc Ingo Molnar <[email protected]>Cc James Clark <[email protected]>Cc Jiri Olsa <[email protected]>Cc Kan Liang <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/ui/browsers/annotate.c | 2 ++ 1 file changed, 2 insertions(+)tools/perf/ui/browsers/annotate.c +2
-0@@ -2,6 +2,7 @@#include "../browser.h" #include "../helpline.h" #include "../ui.h" +#include "../util.h" #include "../../util/annotate.h" #include "../../util/debug.h" #include "../../util/debuginfo.h" @@ -1016,6 +1017,7 @@ int __hist_entry__tui_annotate(struct hist_entry *he, struct map_symbol *ms,return -1 ;if (not_annotated || !sym->annotate2) { +ui__info_window ("Annotating" , sym->name); err =symbol__annotate2 (ms, evsel, &browser.arch);if (err) {char msg[BUFSIZ ];Signature · 1 line
2.49.0