Skip to content

Commit

Permalink
perf_counter tools: when no command is feed to perfstat, display help…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Wu Fengguang authored and Ingo Molnar committed Apr 6, 2009
1 parent dda7c02 commit af9522c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/perf_counter/kerneltop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
*/
Expand Down

0 comments on commit af9522c

Please sign in to comment.