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>
This commit is contained in:
Wu Fengguang 2009-03-20 10:08:10 +08:00 committed by Ingo Molnar
parent dda7c02f33
commit af9522cf13
1 changed files with 3 additions and 0 deletions

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