perf_counter tools: when no command is feed to perfstat, display help and exit
authorWu Fengguang <fengguang.wu@intel.com>
Fri, 20 Mar 2009 02:08:10 +0000 (10:08 +0800)
committerIngo Molnar <mingo@elte.hu>
Mon, 6 Apr 2009 07:30:24 +0000 (09:30 +0200)
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/perf_counter/kerneltop.c

index 0bd3c13150b1f30b3147ebf58dd75e33cc3ba44e..81a68aac137f75d9f726366283348feb8741f9dd 100644 (file)
@@ -387,6 +387,9 @@ int do_perfstat(int argc, char *argv[])
        argc -= optind;
        argv += optind;
 
+       if (!argc)
+               display_help();
+
        /*
         * Enable counters and exec the command:
         */