summaryrefslogtreecommitdiff
path: root/Documentation/perf_counter/builtin-report.c
diff options
context:
space:
mode:
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;
}