Browse Source

perf_counter tools: when no command is feed to perfstat, display help and exit

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>
Wu Fengguang 16 years ago
parent
commit
af9522cf13
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Documentation/perf_counter/kerneltop.c

+ 3 - 0
Documentation/perf_counter/kerneltop.c

@@ -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:
 	 */