summaryrefslogtreecommitdiff
path: root/Documentation/perf_counter/builtin-report.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-04 14:13:04 +0200
committerIngo Molnar <mingo@elte.hu>2009-06-04 14:16:38 +0200
commitbd74137ec9aaca3df3ff22b92455fddf7afaced1 (patch)
tree8b96fa45fd3104f56bb0122b6215c0e7202df825 /Documentation/perf_counter/builtin-report.c
parent95ed6fd06e52bf850cd17524f0b36ed14300c10d (diff)
downloadlwn-bd74137ec9aaca3df3ff22b92455fddf7afaced1.tar.gz
lwn-bd74137ec9aaca3df3ff22b92455fddf7afaced1.zip
perf_counter tools: Print out symbol parsing errors only if --verbose
Also, add a suggestion to 'perf report', if the default sort order is used. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/builtin-report.c')
-rw-r--r--Documentation/perf_counter/builtin-report.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c
index 56c664d1b628..15fe9dae792b 100644
--- a/Documentation/perf_counter/builtin-report.c
+++ b/Documentation/perf_counter/builtin-report.c
@@ -26,7 +26,10 @@
static char const *input_name = "perf.data";
static char *vmlinux = NULL;
-static char *sort_order = "comm,dso";
+
+static char default_sort_order[] = "comm,dso";
+static char *sort_order = default_sort_order;
+
static int input;
static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV;
@@ -103,9 +106,10 @@ static struct dso *dsos__findnew(const char *name)
if (!dso)
goto out_delete_dso;
- nr = dso__load(dso, NULL);
+ nr = dso__load(dso, NULL, verbose);
if (nr < 0) {
- fprintf(stderr, "Failed to open: %s\n", name);
+ if (verbose)
+ fprintf(stderr, "Failed to open: %s\n", name);
goto out_delete_dso;
}
if (!nr && verbose) {
@@ -139,7 +143,7 @@ static int load_kernel(void)
if (!kernel_dso)
return -1;
- err = dso__load_kernel(kernel_dso, vmlinux, NULL);
+ err = dso__load_kernel(kernel_dso, vmlinux, NULL, verbose);
if (err) {
dso__delete(kernel_dso);
kernel_dso = NULL;
@@ -741,6 +745,12 @@ static size_t output__fprintf(FILE *fp, uint64_t total_samples)
ret += hist_entry__fprintf(fp, pos, total_samples);
}
+ if (!strcmp(sort_order, default_sort_order)) {
+ fprintf(fp, "#\n");
+ fprintf(fp, "# ( For more details, try: perf report --sort comm,dso,symbol )\n");
+ fprintf(fp, "#\n");
+ }
+
return ret;
}