My fat-fingering of sort keys in .perfconfig was a common cause of
perf report silently terminating without apparent error.

This was because 1) error in setup_sorting in cmd_report was ignored
and 2) no message was log in UI browser that would prevent UI from
exit before user prompt. Fix both.

Signed-off-by: David Carrillo-Cisneros <[email protected]>
---
 tools/perf/builtin-report.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index c18158b83eb1..19a69ca0e9c9 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -987,12 +987,15 @@ int cmd_report(int argc, const char **argv)
        else
                use_browser = 0;
 
-       if (setup_sorting(session->evlist) < 0) {
+       ret = setup_sorting(session->evlist);
+       if (ret < 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);
+               if (!sort_order && !field_order)
+                       pr_err("Couldn't setup sort order. Is .perfconfig 
correct?\n");
                goto error;
        }
 
-- 
2.12.2.715.g7642488e1d-goog

Reply via email to