]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - tools/perf/util/generate-cmdlist.sh
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[mirror_ubuntu-artful-kernel.git] / tools / perf / util / generate-cmdlist.sh
1 #!/bin/sh
2
3 echo "/* Automatically generated by $0 */
4 struct cmdname_help
5 {
6 char name[16];
7 char help[80];
8 };
9
10 static struct cmdname_help common_cmds[] = {"
11
12 sed -n -e 's/^perf-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
13 sort |
14 while read cmd
15 do
16 sed -n '
17 /^NAME/,/perf-'"$cmd"'/H
18 ${
19 x
20 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
21 p
22 }' "Documentation/perf-$cmd.txt"
23 done
24
25 echo "#ifdef HAVE_LIBELF_SUPPORT"
26 sed -n -e 's/^perf-\([^ ]*\)[ ].* full.*/\1/p' command-list.txt |
27 sort |
28 while read cmd
29 do
30 sed -n '
31 /^NAME/,/perf-'"$cmd"'/H
32 ${
33 x
34 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
35 p
36 }' "Documentation/perf-$cmd.txt"
37 done
38 echo "#endif /* HAVE_LIBELF_SUPPORT */"
39
40 echo "#ifdef HAVE_LIBAUDIT_SUPPORT"
41 sed -n -e 's/^perf-\([^ ]*\)[ ].* audit*/\1/p' command-list.txt |
42 sort |
43 while read cmd
44 do
45 sed -n '
46 /^NAME/,/perf-'"$cmd"'/H
47 ${
48 x
49 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
50 p
51 }' "Documentation/perf-$cmd.txt"
52 done
53 echo "#endif /* HAVE_LIBELF_SUPPORT */"
54 echo "};"