diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-04 08:13:04 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-04 08:16:38 -0400 |
commit | bd74137ec9aaca3df3ff22b92455fddf7afaced1 (patch) | |
tree | 8b96fa45fd3104f56bb0122b6215c0e7202df825 /Documentation/perf_counter/builtin-report.c | |
parent | 95ed6fd06e52bf850cd17524f0b36ed14300c10d (diff) |
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.c | 18 |
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 @@ | |||
26 | 26 | ||
27 | static char const *input_name = "perf.data"; | 27 | static char const *input_name = "perf.data"; |
28 | static char *vmlinux = NULL; | 28 | static char *vmlinux = NULL; |
29 | static char *sort_order = "comm,dso"; | 29 | |
30 | static char default_sort_order[] = "comm,dso"; | ||
31 | static char *sort_order = default_sort_order; | ||
32 | |||
30 | static int input; | 33 | static int input; |
31 | static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; | 34 | static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV; |
32 | 35 | ||
@@ -103,9 +106,10 @@ static struct dso *dsos__findnew(const char *name) | |||
103 | if (!dso) | 106 | if (!dso) |
104 | goto out_delete_dso; | 107 | goto out_delete_dso; |
105 | 108 | ||
106 | nr = dso__load(dso, NULL); | 109 | nr = dso__load(dso, NULL, verbose); |
107 | if (nr < 0) { | 110 | if (nr < 0) { |
108 | fprintf(stderr, "Failed to open: %s\n", name); | 111 | if (verbose) |
112 | fprintf(stderr, "Failed to open: %s\n", name); | ||
109 | goto out_delete_dso; | 113 | goto out_delete_dso; |
110 | } | 114 | } |
111 | if (!nr && verbose) { | 115 | if (!nr && verbose) { |
@@ -139,7 +143,7 @@ static int load_kernel(void) | |||
139 | if (!kernel_dso) | 143 | if (!kernel_dso) |
140 | return -1; | 144 | return -1; |
141 | 145 | ||
142 | err = dso__load_kernel(kernel_dso, vmlinux, NULL); | 146 | err = dso__load_kernel(kernel_dso, vmlinux, NULL, verbose); |
143 | if (err) { | 147 | if (err) { |
144 | dso__delete(kernel_dso); | 148 | dso__delete(kernel_dso); |
145 | kernel_dso = NULL; | 149 | kernel_dso = NULL; |
@@ -741,6 +745,12 @@ static size_t output__fprintf(FILE *fp, uint64_t total_samples) | |||
741 | ret += hist_entry__fprintf(fp, pos, total_samples); | 745 | ret += hist_entry__fprintf(fp, pos, total_samples); |
742 | } | 746 | } |
743 | 747 | ||
748 | if (!strcmp(sort_order, default_sort_order)) { | ||
749 | fprintf(fp, "#\n"); | ||
750 | fprintf(fp, "# ( For more details, try: perf report --sort comm,dso,symbol )\n"); | ||
751 | fprintf(fp, "#\n"); | ||
752 | } | ||
753 | |||
744 | return ret; | 754 | return ret; |
745 | } | 755 | } |
746 | 756 | ||