perf report: Move UI initialization ahead of sort setup
authorJiri Olsa <[email protected]>
Mon, 18 Jan 2016 09:24:06 +0000 (10:24 +0100)
committerArnaldo Carvalho de Melo <[email protected]>
Wed, 3 Feb 2016 15:24:03 +0000 (12:24 -0300)
The ui initialization changes hpp format callbacks, based on the used
browser. Thus we need this init being processed before setup_sorting.

Signed-off-by: Jiri Olsa <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-report.c

index 54ce0479ca28ab90fb3c22aea107df6df3707614..1eab50ac1ef601e04192dadb76e74894c727795a 100644 (file)
@@ -912,15 +912,6 @@ repeat:
                symbol_conf.cumulate_callchain = false;
        }
 
-       if (setup_sorting(session->evlist) < 0) {
-               if (sort_order)
-                       parse_options_usage(report_usage, options, "s", 1);
-               if (field_order)
-                       parse_options_usage(sort_order ? NULL : report_usage,
-                                           options, "F", 1);
-               goto error;
-       }
-
        /* Force tty output for header output and per-thread stat. */
        if (report.header || report.header_only || report.show_threads)
                use_browser = 0;
@@ -930,6 +921,15 @@ repeat:
        else
                use_browser = 0;
 
+       if (setup_sorting(session->evlist) < 0) {
+               if (sort_order)
+                       parse_options_usage(report_usage, options, "s", 1);
+               if (field_order)
+                       parse_options_usage(sort_order ? NULL : report_usage,
+                                           options, "F", 1);
+               goto error;
+       }
+
        if (report.header || report.header_only) {
                perf_session__fprintf_info(session, stdout,
                                           report.show_full_info);