]> git.karo-electronics.de Git - linux-beck.git/blobdiff - tools/perf/builtin-report.c
perf diff: Fix usage array, it must end with a NULL entry
[linux-beck.git] / tools / perf / builtin-report.c
index 24d20e7d125a8e2c4af0fee4f8ef005e66326633..db10c0e8ecae7ee18f4ce352256bed5516fd4024 100644 (file)
@@ -186,7 +186,7 @@ static int sample_type_check(struct perf_session *session)
 static struct perf_event_ops event_ops = {
        .process_sample_event   = process_sample_event,
        .process_mmap_event     = event__process_mmap,
-       .process_comm_event     = event__process_mmap,
+       .process_comm_event     = event__process_comm,
        .process_exit_event     = event__process_task,
        .process_fork_event     = event__process_task,
        .process_lost_event     = event__process_lost,
@@ -224,7 +224,12 @@ static int __cmd_report(void)
 
        perf_session__collapse_resort(session);
        perf_session__output_resort(session, session->events_stats.total);
-       perf_session__fprintf_hists(session, stdout);
+       fprintf(stdout, "# Samples: %Ld\n#\n", session->events_stats.total);
+       perf_session__fprintf_hists(session, NULL, false, stdout);
+       if (sort_order == default_sort_order &&
+           parent_pattern == default_parent_pattern)
+               fprintf(stdout, "#\n# (For a higher level overview, try: perf report --sort comm,dso)\n#\n");
+
        if (show_threads) {
                bool raw_printing_style = !strcmp(pretty_printing_style, "raw");
                perf_read_values_display(stdout, &show_threads_values,
@@ -289,8 +294,7 @@ setup:
        return 0;
 }
 
-//static const char * const report_usage[] = {
-const char * const report_usage[] = {
+static const char * const report_usage[] = {
        "perf report [<options>] <command>",
        NULL
 };
@@ -339,16 +343,6 @@ static const struct option options[] = {
        OPT_END()
 };
 
-static void sort_entry__setup_elide(struct sort_entry *self,
-                                   struct strlist *list,
-                                   const char *list_name, FILE *fp)
-{
-       if (list && strlist__nr_entries(list) == 1) {
-               fprintf(fp, "# %s: %s\n", list_name, strlist__entry(list, 0)->s);
-               self->elide = true;
-       }
-}
-
 int cmd_report(int argc, const char **argv, const char *prefix __used)
 {
        argc = parse_options(argc, argv, options, report_usage, 0);