summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-22 11:25:40 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-22 11:25:40 -0300
commit46e3e055ce69a00d735e458445ab1d24718ff751 (patch)
tree06829420acf27f2deb05ac6ccc230268bf271318 /tools/perf/util/hist.c
parent6e78c9fd1bc2c7e04b3d7052e9eb27aa536e4e2c (diff)
downloadlinux-46e3e055ce69a00d735e458445ab1d24718ff751.tar.gz
linux-46e3e055ce69a00d735e458445ab1d24718ff751.tar.bz2
linux-46e3e055ce69a00d735e458445ab1d24718ff751.zip
perf annotate: Add TUI interface
When annotating multiple entries, for instance, when running simply as: $ perf annotate the right and left keys, as well as TAB can be used to cycle thru the multiple symbols being annotated. If one doesn't like TUI annotate, disable it by editing ~/.perfconfig and adding: [tui] annotate = off Just like it is possible for report. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r--tools/perf/util/hist.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 009ad76b0879..682a6d88862c 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -992,14 +992,14 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head)
char *filename = dso__build_id_filename(dso, NULL, 0);
char command[PATH_MAX * 2];
FILE *file;
- int err = -1;
+ int err = 0;
u64 len;
if (filename == NULL) {
if (dso->has_build_id) {
pr_err("Can't annotate %s: not enough memory\n",
sym->name);
- return -1;
+ return -ENOMEM;
}
/*
* If we don't have build-ids, well, lets hope that this
@@ -1009,14 +1009,12 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head)
}
if (dso->origin == DSO__ORIG_KERNEL) {
- if (dso->annotate_warned) {
- err = 0;
+ if (dso->annotate_warned)
goto out_free_filename;
- }
+ err = -ENOENT;
dso->annotate_warned = 1;
pr_err("Can't annotate %s: No vmlinux file was found in the "
- "path:\n", sym->name);
- vmlinux_path__fprintf(stderr);
+ "path\n", sym->name);
goto out_free_filename;
}
@@ -1046,7 +1044,6 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head)
break;
pclose(file);
- err = 0;
out_free_filename:
if (dso->has_build_id)
free(filename);