perf stat: Better report failure to collect system wide stats
[firefly-linux-kernel-4.4.55.git] / tools / perf / perf.c
index 57cb107c1f13291a7c94272d473bfea5862f6281..2826e702986e0da3c6fd4ce118a14454a9b2fe00 100644 (file)
@@ -16,6 +16,8 @@
 #include "util/string.h"
 #include "util/debugfs.h"
 
+bool use_browser;
+
 const char perf_usage_string[] =
        "perf [--version] [--help] COMMAND [ARGS]";
 
@@ -262,6 +264,8 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
        set_debugfs_path();
 
        status = p->fn(argc, argv, prefix);
+       exit_browser(status);
+
        if (status)
                return status & 0xff;
 
@@ -445,7 +449,7 @@ int main(int argc, const char **argv)
 
        /*
         * We use PATH to find perf commands, but we prepend some higher
-        * precidence paths: the "--exec-path" option, the PERF_EXEC_PATH
+        * precedence paths: the "--exec-path" option, the PERF_EXEC_PATH
         * environment, and the $(perfexecdir) from the Makefile at build
         * time.
         */