* [PATCH 01/23] perf: initial infrasructure for kconfig
[not found] <1364874809-5575-1-git-send-email-dsahern@gmail.com>
@ 2013-04-02 3:53 ` David Ahern
2013-04-02 3:53 ` [PATCH 02/23] perf: make perl support based on CONFIG_LIBPERL David Ahern
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2013-04-02 3:53 UTC (permalink / raw)
To: acme, linux-kernel
Cc: David Ahern, Borislav Petkov, Frederic Weisbecker, Ingo Molnar,
Jiri Olsa, Namhyung Kim, Peter Zijlstra, Stephane Eranian,
linux-kbuild
Add Pconfig file which will hold the build options.
Update Makefile with new config files.
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: linux-kbuild@vger.kernel.org
---
tools/perf/Makefile | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 tools/perf/Pconfig
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index bb74c79..4e54d05 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -5,6 +5,9 @@ all:
include config/utilities.mak
+# Read in config if it exists
+-include $(OUTPUT)include/config/auto.conf
+
# Define V to have a more verbose compile.
#
# Define O to save output files in a separate directory.
@@ -203,6 +206,7 @@ ifneq ($(OUTPUT),)
endif
BASIC_CFLAGS = \
+ -I$(OUTPUT)include \
-Iutil/include \
-Iarch/$(ARCH)/include \
$(if $(objtree),-I$(objtree)/arch/$(ARCH)/include/generated/uapi) \
@@ -409,6 +413,7 @@ LIB_H += ui/helpline.h
LIB_H += ui/progress.h
LIB_H += ui/util.h
LIB_H += ui/ui.h
+LIB_H += $(OUTPUT)include/generated/autoconf.h
LIB_OBJS += $(OUTPUT)util/abspath.o
LIB_OBJS += $(OUTPUT)util/alias.o
diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig
new file mode 100644
index 0000000..e69de29
--
1.7.10.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 02/23] perf: make perl support based on CONFIG_LIBPERL
[not found] <1364874809-5575-1-git-send-email-dsahern@gmail.com>
2013-04-02 3:53 ` [PATCH 01/23] perf: initial infrasructure for kconfig David Ahern
@ 2013-04-02 3:53 ` David Ahern
2013-04-02 3:53 ` [PATCH 03/23] perf: make python support based on CONFIG_LIBPYTHON David Ahern
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2013-04-02 3:53 UTC (permalink / raw)
To: acme, linux-kernel
Cc: David Ahern, Borislav Petkov, Frederic Weisbecker, Ingo Molnar,
Jiri Olsa, Namhyung Kim, Peter Zijlstra, Stephane Eranian
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
---
tools/perf/Makefile | 34 ++++++++++++++-----------------
tools/perf/Pconfig | 2 ++
tools/perf/builtin-script.c | 3 ++-
tools/perf/config/feature-tests.mak | 4 ++--
tools/perf/util/trace-event-scripting.c | 13 ++++++------
5 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 4e54d05..af7b746 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -16,8 +16,6 @@ include config/utilities.mak
#
# Define CROSS_COMPILE as prefix name of compiler if you want cross-builds.
#
-# Define NO_LIBPERL to disable perl script extension.
-#
# Define NO_LIBPYTHON to disable python script extension.
#
# Define PYTHON to point to the python binary if the default
@@ -718,23 +716,21 @@ ifndef NO_GTK2
endif
endif
-ifdef NO_LIBPERL
- BASIC_CFLAGS += -DNO_LIBPERL
-else
- PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
- PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
- PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
- PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
- FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
-
- ifneq ($(call try-cc,$(SOURCE_PERL_EMBED),$(FLAGS_PERL_EMBED),perl),y)
- BASIC_CFLAGS += -DNO_LIBPERL
- else
- ALL_LDFLAGS += $(PERL_EMBED_LDFLAGS)
- EXTLIBS += $(PERL_EMBED_LIBADD)
- LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o
- LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o
- endif
+ifdef CONFIG_LIBPERL
+ PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
+ PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
+ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
+ PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
+ FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
+
+ ifneq ($(call try-cc,$(SOURCE_PERL_EMBED),$(FLAGS_PERL_EMBED)),y)
+ $(error perl module ExtUtils::Embed not installed. Install it or unset CONFIG_LIBPERL to continue)
+ endif
+
+ ALL_LDFLAGS += $(PERL_EMBED_LDFLAGS)
+ EXTLIBS += $(PERL_EMBED_LIBADD)
+ LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o
+ LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o
endif
disable-python = $(eval $(disable-python_code))
diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig
index e69de29..a636af3 100644
--- a/tools/perf/Pconfig
+++ b/tools/perf/Pconfig
@@ -0,0 +1,2 @@
+config LIBPERL
+ bool "Enable support for perl scripting engine"
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 92d4658..7841533 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -16,6 +16,7 @@
#include "util/evsel.h"
#include "util/sort.h"
#include <linux/bitmap.h>
+#include <linux/kconfig.h>
static char const *script_name;
static char const *generate_script_lang;
@@ -1110,7 +1111,7 @@ int find_scripts(char **scripts_array, char **scripts_path_array)
for_each_lang(scripts_path, scripts_dir, lang_dirent, lang_next) {
snprintf(lang_path, MAXPATHLEN, "%s/%s", scripts_path,
lang_dirent.d_name);
-#ifdef NO_LIBPERL
+#ifndef CONFIG_LIBPERL
if (strstr(lang_path, "perl"))
continue;
#endif
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
index b4eabb4..1222b33 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -102,7 +102,7 @@ int main(void)
endef
endif
-ifndef NO_LIBPERL
+ifdef CONFIG_LIBPERL
define SOURCE_PERL_EMBED
#include <EXTERN.h>
#include <perl.h>
@@ -235,4 +235,4 @@ int main(void)
numa_available();
return 0;
}
-endef
\ No newline at end of file
+endef
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c
index 8715a10..3343d97 100644
--- a/tools/perf/util/trace-event-scripting.c
+++ b/tools/perf/util/trace-event-scripting.c
@@ -27,6 +27,7 @@
#include "../perf.h"
#include "util.h"
#include "trace-event.h"
+#include <linux/kconfig.h>
struct scripting_context *scripting_context;
@@ -110,7 +111,7 @@ void setup_python_scripting(void)
static void print_perl_unsupported_msg(void)
{
fprintf(stderr, "Perl scripting not supported."
- " Install libperl and rebuild perf to enable it.\n"
+ " Enable CONFIG_LIBPERL and rebuild perf.\n"
"For example:\n # apt-get install libperl-dev (ubuntu)"
"\n # yum install 'perl(ExtUtils::Embed)' (Fedora)"
"\n etc.\n");
@@ -156,16 +157,16 @@ static void register_perl_scripting(struct scripting_ops *scripting_ops)
scripting_context = malloc(sizeof(struct scripting_context));
}
-#ifdef NO_LIBPERL
+#ifdef CONFIG_LIBPERL
+extern struct scripting_ops perl_scripting_ops;
+
void setup_perl_scripting(void)
{
- register_perl_scripting(&perl_scripting_unsupported_ops);
+ register_perl_scripting(&perl_scripting_ops);
}
#else
-extern struct scripting_ops perl_scripting_ops;
-
void setup_perl_scripting(void)
{
- register_perl_scripting(&perl_scripting_ops);
+ register_perl_scripting(&perl_scripting_unsupported_ops);
}
#endif
--
1.7.10.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 03/23] perf: make python support based on CONFIG_LIBPYTHON
[not found] <1364874809-5575-1-git-send-email-dsahern@gmail.com>
2013-04-02 3:53 ` [PATCH 01/23] perf: initial infrasructure for kconfig David Ahern
2013-04-02 3:53 ` [PATCH 02/23] perf: make perl support based on CONFIG_LIBPERL David Ahern
@ 2013-04-02 3:53 ` David Ahern
2013-04-02 3:53 ` [PATCH 04/23] perf: make gtk2 support based on CONFIG_GTK2 David Ahern
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2013-04-02 3:53 UTC (permalink / raw)
To: acme, linux-kernel
Cc: David Ahern, Borislav Petkov, Frederic Weisbecker, Ingo Molnar,
Jiri Olsa, Namhyung Kim, Peter Zijlstra, Stephane Eranian
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
---
tools/perf/Makefile | 105 +++++++++++++++----------------
tools/perf/Pconfig | 3 +
tools/perf/builtin-script.c | 2 +-
tools/perf/config/feature-tests.mak | 2 +-
tools/perf/util/trace-event-scripting.c | 17 +++--
5 files changed, 61 insertions(+), 68 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index af7b746..2225c3d 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -16,8 +16,6 @@ include config/utilities.mak
#
# Define CROSS_COMPILE as prefix name of compiler if you want cross-builds.
#
-# Define NO_LIBPYTHON to disable python script extension.
-#
# Define PYTHON to point to the python binary if the default
# `python' is not correct; for example: PYTHON=python2
#
@@ -733,69 +731,64 @@ ifdef CONFIG_LIBPERL
LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o
endif
-disable-python = $(eval $(disable-python_code))
-define disable-python_code
- BASIC_CFLAGS += -DNO_LIBPYTHON
- $(if $(1),$(warning No $(1) was found))
- $(warning Python support will not be built)
-endef
+ifdef CONFIG_LIBPYTHON
+ override PYTHON := \
+ $(call get-executable-or-default,PYTHON,python)
-override PYTHON := \
- $(call get-executable-or-default,PYTHON,python)
+ ifndef PYTHON
+ $(error python interpreter not found. Install it or unset CONFIG_LIBPYTHON to continue.)
+ endif
-ifndef PYTHON
- $(call disable-python,python interpreter)
-else
+ PYTHON_WORD := $(call shell-wordify,$(PYTHON))
- PYTHON_WORD := $(call shell-wordify,$(PYTHON))
+ # python extension build directories
+ PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
+ PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
+ PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
+ export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
- ifdef NO_LIBPYTHON
- $(call disable-python)
- else
+ python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
override PYTHON_CONFIG := \
- $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON)-config)
+ $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON)-config)
ifndef PYTHON_CONFIG
- $(call disable-python,python-config tool)
- else
-
- PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
-
- PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
- PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
- PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS))
- PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
- FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
-
- ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED),python),y)
- $(call disable-python,Python.h (for Python 2.x))
- else
-
- ifneq ($(call try-cc,$(SOURCE_PYTHON_VERSION),$(FLAGS_PYTHON_EMBED),python version),y)
- $(warning Python 3 is not yet supported; please set)
- $(warning PYTHON and/or PYTHON_CONFIG appropriately.)
- $(warning If you also have Python 2 installed, then)
- $(warning try something like:)
- $(warning $(and ,))
- $(warning $(and ,) make PYTHON=python2)
- $(warning $(and ,))
- $(warning Otherwise, disable Python support entirely:)
- $(warning $(and ,))
- $(warning $(and ,) make NO_LIBPYTHON=1)
- $(warning $(and ,))
- $(error $(and ,))
- else
- ALL_LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
- EXTLIBS += $(PYTHON_EMBED_LIBADD)
- LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o
- LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o
- LANG_BINDINGS += $(OUTPUT)python/perf.so
- endif
-
- endif
+ $(error python-config not found. Install it or unset CONFIG_LIBPYTHON to continue.)
endif
- endif
+
+ PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
+
+ PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
+ PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
+ PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS))
+ PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
+ FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
+
+ ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y)
+ $(warning Failed to detect python development kit.)
+ $(warning Install it or unset CONFIG_LIBPYTHON to continue.)
+ $(warning e.g., apt-get install python-dev (ubuntu).)
+ $(warning yum install python-devel (Fedora).)
+ $(error )
+ endif
+
+ ifneq ($(call try-cc,$(SOURCE_PYTHON_VERSION),$(FLAGS_PYTHON_EMBED),python version),y)
+ $(warning Python 3 is not yet supported; please set)
+ $(warning PYTHON and/or PYTHON_CONFIG appropriately.)
+ $(warning If you also have Python 2 installed, then)
+ $(warning try something like:)
+ $(warning $(and ,))
+ $(warning $(and ,) make PYTHON=python2)
+ $(warning $(and ,))
+ $(warning Otherwise, disable Python support entirely by unsetting CONFIG_LIBPYTHON.)
+ $(error $(and ,))
+ endif
+
+ ALL_LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
+ EXTLIBS += $(PYTHON_EMBED_LIBADD)
+ LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o
+ LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o
+ LANG_BINDINGS += $(OUTPUT)python/perf.so
endif
ifdef NO_DEMANGLE
diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig
index a636af3..67ae110 100644
--- a/tools/perf/Pconfig
+++ b/tools/perf/Pconfig
@@ -1,2 +1,5 @@
config LIBPERL
bool "Enable support for perl scripting engine"
+
+config LIBPYTHON
+ bool "Enable support for python scripting engine"
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 7841533..e57b87d 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1115,7 +1115,7 @@ int find_scripts(char **scripts_array, char **scripts_path_array)
if (strstr(lang_path, "perl"))
continue;
#endif
-#ifdef NO_LIBPYTHON
+#ifndef CONFIG_LIBPYTHON
if (strstr(lang_path, "python"))
continue;
#endif
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
index 1222b33..2a2fa3b 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -115,7 +115,7 @@ return 0;
endef
endif
-ifndef NO_LIBPYTHON
+ifdef CONFIG_LIBPYTHON
define SOURCE_PYTHON_VERSION
#include <Python.h>
#if PY_VERSION_HEX >= 0x03000000
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c
index 3343d97..932d480 100644
--- a/tools/perf/util/trace-event-scripting.c
+++ b/tools/perf/util/trace-event-scripting.c
@@ -46,11 +46,8 @@ static void process_event_unsupported(union perf_event *event __maybe_unused,
static void print_python_unsupported_msg(void)
{
- fprintf(stderr, "Python scripting not supported."
- " Install libpython and rebuild perf to enable it.\n"
- "For example:\n # apt-get install python-dev (ubuntu)"
- "\n # yum install python-devel (Fedora)"
- "\n etc.\n");
+ fprintf(stderr, "Python scripting not supported.\n"
+ "Enable CONFIG_LIBPYTHON and rebuild perf to enable it.\n");
}
static int python_start_script_unsupported(const char *script __maybe_unused,
@@ -94,17 +91,17 @@ static void register_python_scripting(struct scripting_ops *scripting_ops)
scripting_context = malloc(sizeof(struct scripting_context));
}
-#ifdef NO_LIBPYTHON
+#ifdef CONFIG_LIBPYTHON
+extern struct scripting_ops python_scripting_ops;
+
void setup_python_scripting(void)
{
- register_python_scripting(&python_scripting_unsupported_ops);
+ register_python_scripting(&python_scripting_ops);
}
#else
-extern struct scripting_ops python_scripting_ops;
-
void setup_python_scripting(void)
{
- register_python_scripting(&python_scripting_ops);
+ register_python_scripting(&python_scripting_unsupported_ops);
}
#endif
--
1.7.10.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 04/23] perf: make gtk2 support based on CONFIG_GTK2
[not found] <1364874809-5575-1-git-send-email-dsahern@gmail.com>
` (2 preceding siblings ...)
2013-04-02 3:53 ` [PATCH 03/23] perf: make python support based on CONFIG_LIBPYTHON David Ahern
@ 2013-04-02 3:53 ` David Ahern
2013-04-02 3:53 ` [PATCH 05/23] perf: make newt support based on CONFIG_NEWT David Ahern
2013-04-02 3:53 ` [PATCH 06/23] perf: remove NEWT_SUPPORT in favor of CONFIG_NEWT David Ahern
5 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2013-04-02 3:53 UTC (permalink / raw)
To: acme, linux-kernel
Cc: David Ahern, Borislav Petkov, Frederic Weisbecker, Ingo Molnar,
Jiri Olsa, Namhyung Kim, Peter Zijlstra, Stephane Eranian
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
---
tools/perf/Makefile | 39 ++++++++++++++++-------------------
tools/perf/Pconfig | 3 +++
tools/perf/config/feature-tests.mak | 2 +-
3 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 2225c3d..01e2abf 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -36,8 +36,6 @@ include config/utilities.mak
#
# Define NO_NEWT if you do not want TUI support.
#
-# Define NO_GTK2 if you do not want GTK+ GUI support.
-#
# Define NO_DEMANGLE if you do not want C++ symbol demangling.
#
# Define NO_LIBELF if you do not want libelf dependency (e.g. cross-builds)
@@ -693,25 +691,24 @@ ifndef NO_NEWT
endif
endif
-ifndef NO_GTK2
- FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
- ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2),gtk2),y)
- msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev);
- else
- ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR),y)
- BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR
- endif
- BASIC_CFLAGS += -DGTK2_SUPPORT
- BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null)
- EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null)
- LIB_OBJS += $(OUTPUT)ui/gtk/browser.o
- LIB_OBJS += $(OUTPUT)ui/gtk/hists.o
- LIB_OBJS += $(OUTPUT)ui/gtk/setup.o
- LIB_OBJS += $(OUTPUT)ui/gtk/util.o
- LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o
- LIB_OBJS += $(OUTPUT)ui/gtk/progress.o
- LIB_OBJS += $(OUTPUT)ui/gtk/annotate.o
- endif
+ifdef CONFIG_GTK2
+ FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
+ ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2),gtk2),y)
+ $(error GTK2 not found. Please install gtk2-devel or libgtk2.0-dev or unset CONFIG_GTK2)
+ endif
+ ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR),y)
+ BASIC_CFLAGS += -DHAVE_GTK_INFO_BAR
+ endif
+ BASIC_CFLAGS += -DGTK2_SUPPORT
+ BASIC_CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null)
+ EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null)
+ LIB_OBJS += $(OUTPUT)ui/gtk/browser.o
+ LIB_OBJS += $(OUTPUT)ui/gtk/hists.o
+ LIB_OBJS += $(OUTPUT)ui/gtk/setup.o
+ LIB_OBJS += $(OUTPUT)ui/gtk/util.o
+ LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o
+ LIB_OBJS += $(OUTPUT)ui/gtk/progress.o
+ LIB_OBJS += $(OUTPUT)ui/gtk/annotate.o
endif
ifdef CONFIG_LIBPERL
diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig
index 67ae110..79e1fc3 100644
--- a/tools/perf/Pconfig
+++ b/tools/perf/Pconfig
@@ -1,3 +1,6 @@
+config GTK2
+ bool "Enable GTK-based UI"
+
config LIBPERL
bool "Enable support for perl scripting engine"
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
index 2a2fa3b..bf906e8 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -74,7 +74,7 @@ int main(void)
endef
endif
-ifndef NO_GTK2
+ifdef CONFIG_GTK2
define SOURCE_GTK2
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
#include <gtk/gtk.h>
--
1.7.10.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 05/23] perf: make newt support based on CONFIG_NEWT
[not found] <1364874809-5575-1-git-send-email-dsahern@gmail.com>
` (3 preceding siblings ...)
2013-04-02 3:53 ` [PATCH 04/23] perf: make gtk2 support based on CONFIG_GTK2 David Ahern
@ 2013-04-02 3:53 ` David Ahern
2013-04-02 3:53 ` [PATCH 06/23] perf: remove NEWT_SUPPORT in favor of CONFIG_NEWT David Ahern
5 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2013-04-02 3:53 UTC (permalink / raw)
To: acme, linux-kernel
Cc: David Ahern, Borislav Petkov, Frederic Weisbecker, Ingo Molnar,
Jiri Olsa, Namhyung Kim, Peter Zijlstra, Stephane Eranian
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
---
tools/perf/Makefile | 46 +++++++++++++++++------------------
tools/perf/Pconfig | 3 +++
tools/perf/config/feature-tests.mak | 2 +-
3 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 01e2abf..f4c3b02 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -34,8 +34,6 @@ include config/utilities.mak
#
# Define WERROR=0 to disable treating any warnings as errors.
#
-# Define NO_NEWT if you do not want TUI support.
-#
# Define NO_DEMANGLE if you do not want C++ symbol demangling.
#
# Define NO_LIBELF if you do not want libelf dependency (e.g. cross-builds)
@@ -666,29 +664,29 @@ ifndef NO_LIBAUDIT
endif
endif
-ifndef NO_NEWT
+ifdef CONFIG_NEWT
FLAGS_NEWT=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lnewt
- ifneq ($(call try-cc,$(SOURCE_NEWT),$(FLAGS_NEWT),libnewt),y)
- msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev);
- else
- # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
- BASIC_CFLAGS += -I/usr/include/slang
- BASIC_CFLAGS += -DNEWT_SUPPORT
- EXTLIBS += -lnewt -lslang
- LIB_OBJS += $(OUTPUT)ui/browser.o
- LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o
- LIB_OBJS += $(OUTPUT)ui/browsers/hists.o
- LIB_OBJS += $(OUTPUT)ui/browsers/map.o
- LIB_OBJS += $(OUTPUT)ui/browsers/scripts.o
- LIB_OBJS += $(OUTPUT)ui/tui/setup.o
- LIB_OBJS += $(OUTPUT)ui/tui/util.o
- LIB_OBJS += $(OUTPUT)ui/tui/helpline.o
- LIB_OBJS += $(OUTPUT)ui/tui/progress.o
- LIB_H += ui/browser.h
- LIB_H += ui/browsers/map.h
- LIB_H += ui/keysyms.h
- LIB_H += ui/libslang.h
- endif
+ ifneq ($(call try-cc,$(SOURCE_NEWT),$(FLAGS_NEWT),libnewt),y)
+ $(error newt not found. Please install newt-devel or libnewt-dev or disable CONFIG_NEWT)
+ endif
+
+ # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
+ BASIC_CFLAGS += -I/usr/include/slang
+ BASIC_CFLAGS += -DNEWT_SUPPORT
+ EXTLIBS += -lnewt -lslang
+ LIB_OBJS += $(OUTPUT)ui/browser.o
+ LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o
+ LIB_OBJS += $(OUTPUT)ui/browsers/hists.o
+ LIB_OBJS += $(OUTPUT)ui/browsers/map.o
+ LIB_OBJS += $(OUTPUT)ui/browsers/scripts.o
+ LIB_OBJS += $(OUTPUT)ui/tui/setup.o
+ LIB_OBJS += $(OUTPUT)ui/tui/util.o
+ LIB_OBJS += $(OUTPUT)ui/tui/helpline.o
+ LIB_OBJS += $(OUTPUT)ui/tui/progress.o
+ LIB_H += ui/browser.h
+ LIB_H += ui/browsers/map.h
+ LIB_H += ui/keysyms.h
+ LIB_H += ui/libslang.h
endif
ifdef CONFIG_GTK2
diff --git a/tools/perf/Pconfig b/tools/perf/Pconfig
index 79e1fc3..367cc65 100644
--- a/tools/perf/Pconfig
+++ b/tools/perf/Pconfig
@@ -1,3 +1,6 @@
+config NEWT
+ bool "Enable newt-based TUI"
+
config GTK2
bool "Enable GTK-based UI"
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
index bf906e8..7ec044f 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -61,7 +61,7 @@ int main(void)
}
endef
-ifndef NO_NEWT
+ifdef CONFIG_NEWT
define SOURCE_NEWT
#include <newt.h>
--
1.7.10.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 06/23] perf: remove NEWT_SUPPORT in favor of CONFIG_NEWT
[not found] <1364874809-5575-1-git-send-email-dsahern@gmail.com>
` (4 preceding siblings ...)
2013-04-02 3:53 ` [PATCH 05/23] perf: make newt support based on CONFIG_NEWT David Ahern
@ 2013-04-02 3:53 ` David Ahern
5 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2013-04-02 3:53 UTC (permalink / raw)
To: acme, linux-kernel
Cc: David Ahern, Borislav Petkov, Frederic Weisbecker, Ingo Molnar,
Jiri Olsa, Namhyung Kim, Peter Zijlstra, Stephane Eranian
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
---
tools/perf/Makefile | 1 -
tools/perf/ui/ui.h | 3 ++-
tools/perf/util/annotate.h | 3 ++-
tools/perf/util/hist.h | 3 ++-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index f4c3b02..0cee87c 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -672,7 +672,6 @@ ifdef CONFIG_NEWT
# Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
BASIC_CFLAGS += -I/usr/include/slang
- BASIC_CFLAGS += -DNEWT_SUPPORT
EXTLIBS += -lnewt -lslang
LIB_OBJS += $(OUTPUT)ui/browser.o
LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o
diff --git a/tools/perf/ui/ui.h b/tools/perf/ui/ui.h
index d86359c..b030017 100644
--- a/tools/perf/ui/ui.h
+++ b/tools/perf/ui/ui.h
@@ -4,6 +4,7 @@
#include <pthread.h>
#include <stdbool.h>
#include <linux/compiler.h>
+#include <linux/kconfig.h>
extern pthread_mutex_t ui__lock;
@@ -12,7 +13,7 @@ extern int use_browser;
void setup_browser(bool fallback_to_pager);
void exit_browser(bool wait_for_ok);
-#ifdef NEWT_SUPPORT
+#ifdef CONFIG_NEWT
int ui__init(void);
void ui__exit(bool wait_for_ok);
#else
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index c422440..0435758 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -10,6 +10,7 @@
#include <linux/list.h>
#include <linux/rbtree.h>
#include <pthread.h>
+#include <linux/kconfig.h>
struct ins;
@@ -141,7 +142,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map, int evidx,
bool print_lines, bool full_paths, int min_pcnt,
int max_lines);
-#ifdef NEWT_SUPPORT
+#ifdef CONFIG_NEWT
int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
struct hist_browser_timer *hbt);
#else
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 226a4ae..83c1627 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -5,6 +5,7 @@
#include <pthread.h>
#include "callchain.h"
#include "header.h"
+#include <linux/kconfig.h>
extern struct callchain_param callchain_param;
@@ -175,7 +176,7 @@ struct hist_browser_timer {
int refresh;
};
-#ifdef NEWT_SUPPORT
+#ifdef CONFIG_NEWT
#include "../ui/keysyms.h"
int hist_entry__tui_annotate(struct hist_entry *he, int evidx,
struct hist_browser_timer *hbt);
--
1.7.10.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 06/23] perf: remove NEWT_SUPPORT in favor of CONFIG_NEWT
2013-04-02 3:54 [PATCH 00/23] perf: integrate with kconfig and CONFIG driven features David Ahern
@ 2013-04-02 3:54 ` David Ahern
0 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2013-04-02 3:54 UTC (permalink / raw)
To: acme, linux-kernel
Cc: David Ahern, Borislav Petkov, Frederic Weisbecker, Ingo Molnar,
Jiri Olsa, Namhyung Kim, Peter Zijlstra, Stephane Eranian
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
---
tools/perf/Makefile | 1 -
tools/perf/ui/ui.h | 3 ++-
tools/perf/util/annotate.h | 3 ++-
tools/perf/util/hist.h | 3 ++-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index f4c3b02..0cee87c 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -672,7 +672,6 @@ ifdef CONFIG_NEWT
# Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
BASIC_CFLAGS += -I/usr/include/slang
- BASIC_CFLAGS += -DNEWT_SUPPORT
EXTLIBS += -lnewt -lslang
LIB_OBJS += $(OUTPUT)ui/browser.o
LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o
diff --git a/tools/perf/ui/ui.h b/tools/perf/ui/ui.h
index d86359c..b030017 100644
--- a/tools/perf/ui/ui.h
+++ b/tools/perf/ui/ui.h
@@ -4,6 +4,7 @@
#include <pthread.h>
#include <stdbool.h>
#include <linux/compiler.h>
+#include <linux/kconfig.h>
extern pthread_mutex_t ui__lock;
@@ -12,7 +13,7 @@ extern int use_browser;
void setup_browser(bool fallback_to_pager);
void exit_browser(bool wait_for_ok);
-#ifdef NEWT_SUPPORT
+#ifdef CONFIG_NEWT
int ui__init(void);
void ui__exit(bool wait_for_ok);
#else
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index c422440..0435758 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -10,6 +10,7 @@
#include <linux/list.h>
#include <linux/rbtree.h>
#include <pthread.h>
+#include <linux/kconfig.h>
struct ins;
@@ -141,7 +142,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map, int evidx,
bool print_lines, bool full_paths, int min_pcnt,
int max_lines);
-#ifdef NEWT_SUPPORT
+#ifdef CONFIG_NEWT
int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
struct hist_browser_timer *hbt);
#else
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 226a4ae..83c1627 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -5,6 +5,7 @@
#include <pthread.h>
#include "callchain.h"
#include "header.h"
+#include <linux/kconfig.h>
extern struct callchain_param callchain_param;
@@ -175,7 +176,7 @@ struct hist_browser_timer {
int refresh;
};
-#ifdef NEWT_SUPPORT
+#ifdef CONFIG_NEWT
#include "../ui/keysyms.h"
int hist_entry__tui_annotate(struct hist_entry *he, int evidx,
struct hist_browser_timer *hbt);
--
1.7.10.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-02 3:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1364874809-5575-1-git-send-email-dsahern@gmail.com>
2013-04-02 3:53 ` [PATCH 01/23] perf: initial infrasructure for kconfig David Ahern
2013-04-02 3:53 ` [PATCH 02/23] perf: make perl support based on CONFIG_LIBPERL David Ahern
2013-04-02 3:53 ` [PATCH 03/23] perf: make python support based on CONFIG_LIBPYTHON David Ahern
2013-04-02 3:53 ` [PATCH 04/23] perf: make gtk2 support based on CONFIG_GTK2 David Ahern
2013-04-02 3:53 ` [PATCH 05/23] perf: make newt support based on CONFIG_NEWT David Ahern
2013-04-02 3:53 ` [PATCH 06/23] perf: remove NEWT_SUPPORT in favor of CONFIG_NEWT David Ahern
2013-04-02 3:54 [PATCH 00/23] perf: integrate with kconfig and CONFIG driven features David Ahern
2013-04-02 3:54 ` [PATCH 06/23] perf: remove NEWT_SUPPORT in favor of CONFIG_NEWT David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox