summaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/generate-cmdlist.sh
diff options
context:
space:
mode:
authorIngo Molnar2009-04-20 15:00:56 +0200
committerIngo Molnar2009-04-20 17:36:48 +0200
commit0780060124011b94af55830939c86cc0916be0f5 (patch)
tree883a4d0ed69862ab49e6d4bf4e19debafeb5c48c /Documentation/perf_counter/generate-cmdlist.sh
parentperf_counter: copy in Git's top Makefile (diff)
downloadkernel-qcow2-linux-0780060124011b94af55830939c86cc0916be0f5.tar.gz
kernel-qcow2-linux-0780060124011b94af55830939c86cc0916be0f5.tar.xz
kernel-qcow2-linux-0780060124011b94af55830939c86cc0916be0f5.zip
perf_counter tools: add in basic glue from Git
First very raw version at having a central 'perf' command and a list of subcommands: perf top perf stat perf record perf report ... This is done by picking up Git's collection of utility functions, and hacking them to build fine in this new environment. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/generate-cmdlist.sh')
-rwxr-xr-xDocumentation/perf_counter/generate-cmdlist.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/Documentation/perf_counter/generate-cmdlist.sh b/Documentation/perf_counter/generate-cmdlist.sh
new file mode 100755
index 000000000000..75c68d948fd3
--- /dev/null
+++ b/Documentation/perf_counter/generate-cmdlist.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+echo "/* Automatically generated by $0 */
+struct cmdname_help
+{
+ char name[16];
+ char help[80];
+};
+
+static struct cmdname_help common_cmds[] = {"
+
+sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
+sort |
+while read cmd
+do
+ sed -n '
+ /^NAME/,/git-'"$cmd"'/H
+ ${
+ x
+ s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
+ p
+ }' "Documentation/git-$cmd.txt"
+done
+echo "};"