Commit 26276089 authored by Ingo Molnar's avatar Ingo Molnar

Merge tag 'perf-core-for-mingo' of...

Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

Improvements for 'perf annotate' from Namhyung Kim.
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parents 737f24bd ff2a6617
...@@ -15,6 +15,16 @@ endif ...@@ -15,6 +15,16 @@ endif
# Define V to have a more verbose compile. # Define V to have a more verbose compile.
# #
# Define O to save output files in a separate directory.
#
# Define ARCH as name of target architecture if you want cross-builds.
#
# Define CROSS_COMPILE as prefix name of compiler if you want cross-builds.
#
# Define NO_LIBPERL to disable perl script extension.
#
# Define NO_LIBPYTHON to disable python script extension.
#
# Define PYTHON to point to the python binary if the default # Define PYTHON to point to the python binary if the default
# `python' is not correct; for example: PYTHON=python2 # `python' is not correct; for example: PYTHON=python2
# #
...@@ -32,6 +42,10 @@ endif ...@@ -32,6 +42,10 @@ endif
# Define NO_DWARF if you do not want debug-info analysis feature at all. # Define NO_DWARF if you do not want debug-info analysis feature at all.
# #
# Define WERROR=0 to disable treating any warnings as errors. # Define WERROR=0 to disable treating any warnings as errors.
#
# Define NO_NEWT if you do not want TUI support.
#
# Define NO_DEMANGLE if you do not want C++ symbol demangling.
$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
@$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
......
...@@ -315,7 +315,7 @@ int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize) ...@@ -315,7 +315,7 @@ int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize)
"Please use:\n\n" "Please use:\n\n"
" perf buildid-cache -av vmlinux\n\n" " perf buildid-cache -av vmlinux\n\n"
"or:\n\n" "or:\n\n"
" --vmlinux vmlinux", " --vmlinux vmlinux\n",
sym->name, build_id_msg ?: ""); sym->name, build_id_msg ?: "");
goto out_free_filename; goto out_free_filename;
} }
......
...@@ -765,6 +765,7 @@ int perf_evlist__open(struct perf_evlist *evlist, bool group) ...@@ -765,6 +765,7 @@ int perf_evlist__open(struct perf_evlist *evlist, bool group)
list_for_each_entry_reverse(evsel, &evlist->entries, node) list_for_each_entry_reverse(evsel, &evlist->entries, node)
perf_evsel__close(evsel, ncpus, nthreads); perf_evsel__close(evsel, ncpus, nthreads);
errno = -err;
return err; return err;
} }
......
...@@ -69,14 +69,17 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro ...@@ -69,14 +69,17 @@ static void annotate_browser__write(struct ui_browser *self, void *entry, int ro
if (!self->navkeypressed) if (!self->navkeypressed)
width += 1; width += 1;
if (!ab->hide_src_code && ol->offset != -1)
if (!current_entry || (self->use_navkeypressed &&
!self->navkeypressed))
ui_browser__set_color(self, HE_COLORSET_CODE);
if (!*ol->line) if (!*ol->line)
slsmg_write_nstring(" ", width - 18); slsmg_write_nstring(" ", width - 18);
else else
slsmg_write_nstring(ol->line, width - 18); slsmg_write_nstring(ol->line, width - 18);
if (!current_entry) if (current_entry)
ui_browser__set_color(self, HE_COLORSET_CODE);
else
ab->selection = ol; ab->selection = ol;
} }
...@@ -230,9 +233,9 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, ...@@ -230,9 +233,9 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
struct rb_node *nd = NULL; struct rb_node *nd = NULL;
struct map_symbol *ms = self->b.priv; struct map_symbol *ms = self->b.priv;
struct symbol *sym = ms->sym; struct symbol *sym = ms->sym;
const char *help = "<-, ESC: exit, TAB/shift+TAB: cycle hottest lines, " const char *help = "<-/ESC: Exit, TAB/shift+TAB: Cycle hot lines, "
"H: Hottest, -> Line action, S -> Toggle source " "H: Go to hottest line, ->/ENTER: Line action, "
"code view"; "S: Toggle source code view";
int key; int key;
if (ui_browser__show(&self->b, sym->name, help) < 0) if (ui_browser__show(&self->b, sym->name, help) < 0)
...@@ -284,9 +287,11 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, ...@@ -284,9 +287,11 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
nd = self->curr_hot; nd = self->curr_hot;
break; break;
case 'H': case 'H':
case 'h':
nd = self->curr_hot; nd = self->curr_hot;
break; break;
case 'S': case 'S':
case 's':
if (annotate_browser__toggle_source(self)) if (annotate_browser__toggle_source(self))
ui_helpline__puts(help); ui_helpline__puts(help);
continue; continue;
...@@ -338,6 +343,7 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx, ...@@ -338,6 +343,7 @@ static int annotate_browser__run(struct annotate_browser *self, int evidx,
pthread_mutex_unlock(&notes->lock); pthread_mutex_unlock(&notes->lock);
symbol__tui_annotate(target, ms->map, evidx, symbol__tui_annotate(target, ms->map, evidx,
timer, arg, delay_secs); timer, arg, delay_secs);
ui_browser__show_title(&self->b, sym->name);
} }
continue; continue;
case K_LEFT: case K_LEFT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment