aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-20 10:05:55 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-20 11:36:49 -0400
commit6142fdd968c76a0f2ee753c39bd5be8d1bb4ef04 (patch)
treec202ce98a48c78f880fe99afee28a8658ec8b60d
parentcc13a5913797365b683212f5fca5fb04bb3582eb (diff)
perf_counter tools: add 'perf help'
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--Documentation/perf_counter/Documentation/perf-help.txt38
-rw-r--r--Documentation/perf_counter/builtin.h1
-rw-r--r--Documentation/perf_counter/perf.c1
3 files changed, 40 insertions, 0 deletions
diff --git a/Documentation/perf_counter/Documentation/perf-help.txt b/Documentation/perf_counter/Documentation/perf-help.txt
new file mode 100644
index 000000000000..f85fed5a7edb
--- /dev/null
+++ b/Documentation/perf_counter/Documentation/perf-help.txt
@@ -0,0 +1,38 @@
1perf-help(1)
2===========
3
4NAME
5----
6perf-help - display help information about perf
7
8SYNOPSIS
9--------
10'perf help' [-a|--all] [COMMAND]
11
12DESCRIPTION
13-----------
14
15With no options and no COMMAND given, the synopsis of the 'perf'
16command and a list of the most commonly used perf commands are printed
17on the standard output.
18
19If the option '--all' or '-a' is given, then all available commands are
20printed on the standard output.
21
22If a perf command is named, a manual page for that command is brought
23up. The 'man' program is used by default for this purpose, but this
24can be overridden by other options or configuration variables.
25
26Note that `perf --help ...` is identical to `perf help ...` because the
27former is internally converted into the latter.
28
29OPTIONS
30-------
31-a::
32--all::
33 Prints all the available commands on the standard output. This
34 option supersedes any other option.
35
36PERF
37----
38Part of the linkperf:perf[1] suite
diff --git a/Documentation/perf_counter/builtin.h b/Documentation/perf_counter/builtin.h
index aec5ae388e66..800f86c1d445 100644
--- a/Documentation/perf_counter/builtin.h
+++ b/Documentation/perf_counter/builtin.h
@@ -14,6 +14,7 @@ extern void prune_packed_objects(int);
14extern int read_line_with_nul(char *buf, int size, FILE *file); 14extern int read_line_with_nul(char *buf, int size, FILE *file);
15extern int check_pager_config(const char *cmd); 15extern int check_pager_config(const char *cmd);
16 16
17extern int cmd_help(int argc, const char **argv, const char *prefix);
17extern int cmd_record(int argc, const char **argv, const char *prefix); 18extern int cmd_record(int argc, const char **argv, const char *prefix);
18extern int cmd_stat(int argc, const char **argv, const char *prefix); 19extern int cmd_stat(int argc, const char **argv, const char *prefix);
19extern int cmd_top(int argc, const char **argv, const char *prefix); 20extern int cmd_top(int argc, const char **argv, const char *prefix);
diff --git a/Documentation/perf_counter/perf.c b/Documentation/perf_counter/perf.c
index 20d508c77293..8d6faecdc15d 100644
--- a/Documentation/perf_counter/perf.c
+++ b/Documentation/perf_counter/perf.c
@@ -248,6 +248,7 @@ static void handle_internal_command(int argc, const char **argv)
248{ 248{
249 const char *cmd = argv[0]; 249 const char *cmd = argv[0];
250 static struct cmd_struct commands[] = { 250 static struct cmd_struct commands[] = {
251 { "help", cmd_help, 0 },
251 { "record", cmd_record, 0 }, 252 { "record", cmd_record, 0 },
252 { "stat", cmd_stat, 0 }, 253 { "stat", cmd_stat, 0 },
253 { "top", cmd_top, 0 }, 254 { "top", cmd_top, 0 },