From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756177AbcAIQhf (ORCPT ); Sat, 9 Jan 2016 11:37:35 -0500 Received: from terminus.zytor.com ([198.137.202.10]:42215 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755875AbcAIQhc (ORCPT ); Sat, 9 Jan 2016 11:37:32 -0500 Date: Sat, 9 Jan 2016 08:37:16 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: namhyung@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, a.p.zijlstra@chello.nl, mingo@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, dsahern@gmail.com, hpa@zytor.com, noelgrandin@gmail.com Reply-To: noelgrandin@gmail.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, dsahern@gmail.com, mingo@kernel.org, acme@redhat.com, namhyung@kernel.org, adrian.hunter@intel.com, jolsa@kernel.org, a.p.zijlstra@chello.nl In-Reply-To: <1452158050-28061-8-git-send-email-jolsa@kernel.org> References: <1452158050-28061-8-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Do not show trace command if it' s not compiled in Git-Commit-ID: cbd08b7335c9d559f424dcef7bea333605597490 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: cbd08b7335c9d559f424dcef7bea333605597490 Gitweb: http://git.kernel.org/tip/cbd08b7335c9d559f424dcef7bea333605597490 Author: Jiri Olsa AuthorDate: Thu, 7 Jan 2016 10:14:04 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 8 Jan 2016 12:46:17 -0300 perf tools: Do not show trace command if it's not compiled in 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 Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Noel Grandin Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1452158050-28061-8-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/command-list.txt | 2 +- tools/perf/util/generate-cmdlist.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/perf/command-list.txt b/tools/perf/command-list.txt index acc3ea7..ab5cbaa 100644 --- a/tools/perf/command-list.txt +++ b/tools/perf/command-list.txt @@ -26,4 +26,4 @@ perf-stat mainporcelain common perf-test mainporcelain common perf-timechart mainporcelain common perf-top mainporcelain common -perf-trace mainporcelain common +perf-trace mainporcelain audit diff --git a/tools/perf/util/generate-cmdlist.sh b/tools/perf/util/generate-cmdlist.sh index 36a885d..0ac2037 100755 --- a/tools/perf/util/generate-cmdlist.sh +++ b/tools/perf/util/generate-cmdlist.sh @@ -36,4 +36,19 @@ do }' "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 "};"