aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-03-20 10:08:10 +0800
committerIngo Molnar <mingo@elte.hu>2009-04-06 09:30:24 +0200
commitaf9522cf133e9be6da8525a46a9ed7e7659f0e1a (patch)
tree51e40129c2eade735f224e7b9bcb6eb0fba529df
parentdda7c02f33833bfa9412ba6f0e410b0a18b42c88 (diff)
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>
-rw-r--r--Documentation/perf_counter/kerneltop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/perf_counter/kerneltop.c b/Documentation/perf_counter/kerneltop.c
index 0bd3c13150b..81a68aac137 100644
--- a/Documentation/perf_counter/kerneltop.c
+++ b/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:
*/