mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
cbd08b7335
The trace command still appears in help message when you run simple 'perf' command. It's because the generate-cmdlist.sh does not care about the HAVE_LIBAUDIT_SUPPORT dependency of trace command and puts it into generated common_cmds array. Wrapping trace command under HAVE_LIBAUDIT_SUPPORT dependency, which will exclude it from common_cmds array if HAVE_LIBAUDIT_SUPPORT is not set. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Noel Grandin <noelgrandin@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1452158050-28061-8-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
55 lines
1.1 KiB
Bash
Executable File
55 lines
1.1 KiB
Bash
Executable File
#!/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/^perf-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
|
|
sort |
|
|
while read cmd
|
|
do
|
|
sed -n '
|
|
/^NAME/,/perf-'"$cmd"'/H
|
|
${
|
|
x
|
|
s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
|
|
p
|
|
}' "Documentation/perf-$cmd.txt"
|
|
done
|
|
|
|
echo "#ifdef HAVE_LIBELF_SUPPORT"
|
|
sed -n -e 's/^perf-\([^ ]*\)[ ].* full.*/\1/p' command-list.txt |
|
|
sort |
|
|
while read cmd
|
|
do
|
|
sed -n '
|
|
/^NAME/,/perf-'"$cmd"'/H
|
|
${
|
|
x
|
|
s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
|
|
p
|
|
}' "Documentation/perf-$cmd.txt"
|
|
done
|
|
echo "#endif /* HAVE_LIBELF_SUPPORT */"
|
|
|
|
echo "#ifdef HAVE_LIBAUDIT_SUPPORT"
|
|
sed -n -e 's/^perf-\([^ ]*\)[ ].* audit*/\1/p' command-list.txt |
|
|
sort |
|
|
while read cmd
|
|
do
|
|
sed -n '
|
|
/^NAME/,/perf-'"$cmd"'/H
|
|
${
|
|
x
|
|
s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
|
|
p
|
|
}' "Documentation/perf-$cmd.txt"
|
|
done
|
|
echo "#endif /* HAVE_LIBELF_SUPPORT */"
|
|
echo "};"
|