linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexis Berlemont <alexis.berlemont@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jiri Olsa <jolsa@redhat.com>,
	dsahern@gmail.com, mingo@kernel.org, sam@ravnborg.org,
	mmarek@suse.cz,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Borislav Petkov <bp@alien8.de>,
	linux-kbuild@vger.kernel.org,
	Stephane Eranian <eranian@google.com>
Subject: [PATCH 03/32] perf tools: Kbuild source related fixies
Date: Wed,  4 Jun 2014 00:05:56 +0200	[thread overview]
Message-ID: <1401833185-10347-4-git-send-email-alexis.berlemont@gmail.com> (raw)
In-Reply-To: <1401833185-10347-1-git-send-email-alexis.berlemont@gmail.com>
In-Reply-To: <CAMesUR5h0687dTFCDC3LhKSOFyKTFmH3vUjU+p6XuOpawPUwxQ@mail.gmail.com>

From: Jiri Olsa <jolsa@redhat.com>

Fixing several sources config dependencies to allow
separate config builds.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Cc: Stephane Eranian <eranian@google.com>
---
 tools/perf/builtin-lock.c        |  4 +++-
 tools/perf/builtin-sched.c       |  2 ++
 tools/perf/perf.c                |  6 ++++++
 tools/perf/perf.h                |  2 ++
 tools/perf/ui/browsers/scripts.c |  4 ++++
 tools/perf/ui/setup.c            | 10 +++++++++-
 6 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index c852c7a..b255c20 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -992,9 +992,11 @@ int cmd_lock(int argc, const char **argv, const char *prefix __maybe_unused)
 				usage_with_options(report_usage, report_options);
 		}
 		rc = __cmd_report(false);
+#ifdef CONFIG_BULTIN_SCRIPT
 	} else if (!strcmp(argv[0], "script")) {
 		/* Aliased to 'perf script' */
-		return cmd_script(argc, argv, prefix);
+		rc = cmd_script(argc, argv, prefix);
+#endif
 	} else if (!strcmp(argv[0], "info")) {
 		if (argc) {
 			argc = parse_options(argc, argv,
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 9ac0a49..cb77a4e 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1741,11 +1741,13 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 	if (!argc)
 		usage_with_options(sched_usage, sched_options);
 
+#ifdef CONFIG_BULTIN_SCRIPT
 	/*
 	 * Aliased to 'perf script' for now:
 	 */
 	if (!strcmp(argv[0], "script"))
 		return cmd_script(argc, argv, prefix);
+#endif
 
 	symbol__init();
 	if (!strncmp(argv[0], "rec", 3)) {
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index c39470b..74a1269 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -92,7 +92,9 @@ static struct cmd_struct commands[] = {
 #ifdef CONFIG_BUILTIN_KVM
 	{ "kvm",	cmd_kvm,	0 },
 #endif
+#ifdef CONFIG_BUILTIN_TEST
 	{ "test",	cmd_test,	0 },
+#endif
 #if defined HAVE_LIBAUDIT_SUPPORT && defined CONFIG_BUILTIN_TRACE
 	{ "trace",	cmd_trace,	0 },
 #endif
@@ -543,13 +545,17 @@ int main(int argc, const char **argv)
 	} else {
 		/* The user didn't specify a command; give them help */
 		printf("\n usage: %s\n\n", perf_usage_string);
+#ifdef CONFIG_BUILTIN_HELP
 		list_common_cmds_help();
 		printf("\n %s\n\n", perf_more_info_string);
+#endif
 		goto out;
 	}
 	cmd = argv[0];
 
+#ifdef CONFIG_BUILTIN_TEST
 	test_attr__init();
+#endif
 
 	/*
 	 * We use PATH to find perf commands, but we prepend some higher
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 5c11eca..8487a30 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -221,8 +221,10 @@ sys_perf_event_open(struct perf_event_attr *attr,
 	fd = syscall(__NR_perf_event_open, attr, pid, cpu,
 		     group_fd, flags);
 
+#ifdef CONFIG_BUILTIN_TEST
 	if (unlikely(test_attr__enabled))
 		test_attr__open(attr, pid, cpu, fd, group_fd, flags);
+#endif
 
 	return fd;
 }
diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
index 402d2bd..128988d 100644
--- a/tools/perf/ui/browsers/scripts.c
+++ b/tools/perf/ui/browsers/scripts.c
@@ -59,7 +59,11 @@ static int list_scripts(char *script_name)
 		paths[i] = names[i] + SCRIPT_NAMELEN;
 	}
 
+#ifdef CONFIG_BUILTIN_SCRIPT
 	num = find_scripts(names, paths);
+#else
+	num = 0;
+#endif
 	if (num > 0) {
 		choice = ui__popup_menu(num, names);
 		if (choice < num && choice >= 0) {
diff --git a/tools/perf/ui/setup.c b/tools/perf/ui/setup.c
index 5df5140..66ecd08 100644
--- a/tools/perf/ui/setup.c
+++ b/tools/perf/ui/setup.c
@@ -71,16 +71,20 @@ void setup_browser(bool fallback_to_pager)
 
 	switch (use_browser) {
 	case 2:
+#if defined(CONFIG_GUI) || !defined(CONFIG_KBUILD)
 		if (setup_gtk_browser() == 0)
 			break;
 		printf("GTK browser requested but could not find %s\n",
 		       PERF_GTK_DSO);
 		sleep(1);
+#endif
 		/* fall through */
+#if defined(CONFIG_TUI) || !defined(CONFIG_KBUILD)
 	case 1:
 		use_browser = 1;
 		if (ui__init() == 0)
 			break;
+#endif
 		/* fall through */
 	default:
 		use_browser = 0;
@@ -92,16 +96,20 @@ void setup_browser(bool fallback_to_pager)
 	}
 }
 
-void exit_browser(bool wait_for_ok)
+void exit_browser(bool wait_for_ok __maybe_unused)
 {
 	switch (use_browser) {
 	case 2:
+#if defined(CONFIG_GUI) || !defined(CONFIG_KBUILD)
 		exit_gtk_browser(wait_for_ok);
 		break;
+#endif
 
+#if defined(CONFIG_TUI) || !defined(CONFIG_KBUILD)
 	case 1:
 		ui__exit(wait_for_ok);
 		break;
+#endif
 
 	default:
 		break;
-- 
1.9.3


  parent reply	other threads:[~2014-06-03 22:18 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 22:02 [PATCH 00/34] perf and kconfig / kbuild Alexis Berlemont
2014-05-13 22:02 ` [PATCH 01/34] kbuild: Introduce KBUILD_AUTOCONF variable for auto.conf include Alexis Berlemont
2014-05-14  5:00   ` Sam Ravnborg
2014-05-13 22:02 ` [PATCH 02/34] kbuild: Introduce KCONFIG_AUTOCONFIGDEP variable for conf tool Alexis Berlemont
2014-05-14  5:02   ` Sam Ravnborg
2014-05-14 10:17   ` Michal Marek
2014-05-13 22:02 ` [PATCH 03/34] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-05-13 22:02 ` [PATCH 04/34] perf tools: Kbuild " Alexis Berlemont
2014-05-13 22:03 ` [PATCH 05/34] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-05-13 22:03 ` [PATCH 06/34] perf kbuild: fix recursive invocation of config/features-checks Alexis Berlemont
2014-05-13 22:03 ` [PATCH 07/34] perf kbuild: store in config-detected missing variables (libdir, ...) Alexis Berlemont
2014-05-13 22:03 ` [PATCH 08/34] perf kbuild: remove useless #ifdef directives Alexis Berlemont
2014-05-13 22:03 ` [PATCH 09/34] perf kbuild: fix a link issue if BUILTIN_TRACE is disabled Alexis Berlemont
2014-05-13 22:03 ` [PATCH 10/34] perf kbuild: add missing files and missing flags in Kbuild files Alexis Berlemont
2014-05-13 22:03 ` [PATCH 11/34] perf kbuild: update kbuild files according to last changes Alexis Berlemont
2014-05-13 22:03 ` [PATCH 12/34] perf kbuild: remove legacy slang-related build variables Alexis Berlemont
2014-05-13 22:03 ` [PATCH 13/34] perf kbuild: remove legacy libaudit-related " Alexis Berlemont
2014-05-13 22:03 ` [PATCH 14/34] perf kbuild: remove legacy libgtk2-related " Alexis Berlemont
2014-05-13 22:03 ` [PATCH 15/34] perf kbuild: remove legacy libperl-related " Alexis Berlemont
2014-05-13 22:03 ` [PATCH 16/34] perf kbuild: remove legacy timerfd-related build variable Alexis Berlemont
2014-05-13 22:03 ` [PATCH 17/34] perf kbuild: remove legacy demangle-related build variables Alexis Berlemont
2014-05-13 22:03 ` [PATCH 18/34] perf kbuild: remove legacy on_exit-related build variable Alexis Berlemont
2014-05-13 22:03 ` [PATCH 19/34] perf kbuild: remove legacy backtrace-related " Alexis Berlemont
2014-05-13 22:03 ` [PATCH 20/34] perf kbuild: remove legacy numa-related " Alexis Berlemont
2014-05-13 22:03 ` [PATCH 21/34] perf kbuild: remove legacy bionic-related " Alexis Berlemont
2014-05-13 22:03 ` [PATCH 22/34] perf kbuild: remove legacy libelf-related build variables (1st part) Alexis Berlemont
2014-05-13 22:03 ` [PATCH 23/34] perf kbuild: remove legacy libelf-related build variables (2nd part) Alexis Berlemont
2014-05-13 22:03 ` [PATCH 24/34] perf kbuild: remove legacy libdwarf-related build variables Alexis Berlemont
2014-05-13 22:03 ` [PATCH 25/34] perf kbuild: remove legacy libunwind-related " Alexis Berlemont
2014-05-13 22:03 ` [PATCH 26/34] perf kbuild: remove legacy libpython-related build variable Alexis Berlemont
2014-05-13 22:03 ` [PATCH 27/34] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-05-13 22:03 ` [PATCH 28/34] perf kbuild: fix installation of traceevent plugins Alexis Berlemont
2014-05-13 22:03 ` [PATCH 29/34] perf kbuild: fix tarpkg target in tests/make Alexis Berlemont
2014-05-13 22:03 ` [PATCH 30/34] perf kbuild: update Kbuild files with new and removed sources Alexis Berlemont
2014-05-13 22:03 ` [PATCH 31/34] perf kbuild: update build test configurations Alexis Berlemont
2014-05-13 22:03 ` [PATCH 32/34] perf kbuild: relocate the configs generating script Alexis Berlemont
2014-05-13 22:03 ` [PATCH 33/34] perf kbuild: minor changes Alexis Berlemont
2014-05-13 22:03 ` [PATCH 34/34] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-05-14  2:15 ` [PATCH 00/34] perf and kconfig / kbuild David Ahern
2014-05-17 15:39   ` Alexis Berlemont
2014-06-03 22:05     ` [PATCH 00/32] perf and kconfig kbuild (2nd try) Alexis Berlemont
2014-06-04  1:59       ` David Ahern
2014-06-04 11:12         ` Alexis Berlemont
2014-06-24 22:47           ` [PATCH 00/13] perf and kbuild (3rd try) Alexis Berlemont
2014-06-24 22:47           ` [PATCH 01/13] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-06-24 22:47           ` [PATCH 02/13] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-06-24 22:47           ` [PATCH 03/13] perf tools: Kbuild " Alexis Berlemont
2014-06-24 22:47           ` [PATCH 04/13] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-06-24 22:47           ` [PATCH 05/13] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-06-24 22:47           ` [PATCH 06/13] perf kbuild: remove legacy tui/gui-related build variables Alexis Berlemont
2014-06-24 22:47           ` [PATCH 07/13] perf kbuild: remove legacy demangle-related " Alexis Berlemont
2014-06-24 22:47           ` [PATCH 08/13] perf kbuild: remove legacy misc " Alexis Berlemont
2014-06-24 22:47           ` [PATCH 09/13] perf kbuild: remove legacy libelf-related " Alexis Berlemont
2014-06-24 22:47           ` [PATCH 10/13] perf kbuild: remove legacy libdwarf-related " Alexis Berlemont
2014-06-24 22:47           ` [PATCH 11/13] perf kbuild: remove legacy script-related " Alexis Berlemont
2014-06-24 22:47           ` [PATCH 12/13] perf kbuild: final cosmetic changes Alexis Berlemont
2014-06-24 22:48           ` [PATCH 13/13] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-06-03 22:05     ` [PATCH 01/32] kbuild: add support of custom paths for "auto.conf*" files Alexis Berlemont
2014-06-03 22:05     ` [PATCH 02/32] perf tools: Kbuild builtin source related fixies Alexis Berlemont
2014-06-04  6:58       ` Paul Bolle
2014-06-04 14:15         ` David Ahern
2014-06-03 22:05     ` Alexis Berlemont [this message]
2014-06-04  1:49       ` [PATCH 03/32] perf tools: Kbuild " David Ahern
2014-06-04  6:49         ` Paul Bolle
2014-06-03 22:05     ` [PATCH 04/32] perf tools: Add kbuild support into Makefile.kbuild Alexis Berlemont
2014-06-03 22:05     ` [PATCH 05/32] perf kbuild: fix recursive invocation of config/features-checks Alexis Berlemont
2014-06-04  1:50       ` David Ahern
2014-06-03 22:05     ` [PATCH 06/32] perf kbuild: store in config-detected missing variables (libdir, ...) Alexis Berlemont
2014-06-04  1:52       ` David Ahern
2014-06-03 22:06     ` [PATCH 07/32] perf kbuild: remove useless #ifdef directives Alexis Berlemont
2014-06-04  1:53       ` David Ahern
2014-06-04 21:20         ` Alexis Berlemont
2014-06-03 22:06     ` [PATCH 08/32] perf kbuild: fix a link issue if BUILTIN_TRACE is disabled Alexis Berlemont
2014-06-03 22:06     ` [PATCH 09/32] perf kbuild: add missing files and missing flags in Kbuild files Alexis Berlemont
2014-06-03 22:06     ` [PATCH 10/32] perf kbuild: update kbuild files according to last changes Alexis Berlemont
2014-06-03 22:06     ` [PATCH 11/32] perf kbuild: remove legacy slang-related build variables Alexis Berlemont
2014-06-03 22:06     ` [PATCH 12/32] perf kbuild: remove legacy libaudit-related " Alexis Berlemont
2014-06-03 22:06     ` [PATCH 13/32] perf kbuild: remove legacy libgtk2-related " Alexis Berlemont
2014-06-03 22:06     ` [PATCH 14/32] perf kbuild: remove legacy libperl-related " Alexis Berlemont
2014-06-03 22:06     ` [PATCH 15/32] perf kbuild: remove legacy timerfd-related build variable Alexis Berlemont
2014-06-03 22:06     ` [PATCH 16/32] perf kbuild: remove legacy demangle-related build variables Alexis Berlemont
2014-06-03 22:06     ` [PATCH 17/32] perf kbuild: remove legacy on_exit-related build variable Alexis Berlemont
2014-06-03 22:06     ` [PATCH 18/32] perf kbuild: remove legacy backtrace-related " Alexis Berlemont
2014-06-03 22:06     ` [PATCH 19/32] perf kbuild: remove legacy numa-related " Alexis Berlemont
2014-06-03 22:06     ` [PATCH 20/32] perf kbuild: remove legacy bionic-related " Alexis Berlemont
2014-06-03 22:06     ` [PATCH 21/32] perf kbuild: remove legacy libelf-related build variables (1st part) Alexis Berlemont
2014-06-03 22:06     ` [PATCH 22/32] perf kbuild: remove legacy libelf-related build variables (2nd part) Alexis Berlemont
2014-06-03 22:06     ` [PATCH 23/32] perf kbuild: remove legacy libdwarf-related build variables Alexis Berlemont
2014-06-03 22:06     ` [PATCH 24/32] perf kbuild: remove legacy libpython-related build variable Alexis Berlemont
2014-06-03 22:06     ` [PATCH 25/32] perf kbuild: add generated Kconfig build-test cases Alexis Berlemont
2014-06-03 22:06     ` [PATCH 26/32] perf kbuild: fix installation of traceevent plugins Alexis Berlemont
2014-06-03 22:06     ` [PATCH 27/32] perf kbuild: fix tarpkg target in tests/make Alexis Berlemont
2014-06-03 22:06     ` [PATCH 28/32] perf kbuild: update Kbuild files with new and removed sources Alexis Berlemont
2014-06-03 22:06     ` [PATCH 29/32] perf kbuild: update build test configurations Alexis Berlemont
2014-06-03 22:06     ` [PATCH 30/32] perf kbuild: relocate the configs generating script Alexis Berlemont
2014-06-03 22:06     ` [PATCH 31/32] perf kbuild: minor changes Alexis Berlemont
2014-06-03 22:06     ` [PATCH 32/32] perf kbuild: remove Makefile.perf Alexis Berlemont
2014-05-15  8:05 ` [PATCH 00/34] perf and kconfig / kbuild Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401833185-10347-4-git-send-email-alexis.berlemont@gmail.com \
    --to=alexis.berlemont@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=bp@alien8.de \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@kernel.org \
    --cc=mmarek@suse.cz \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).