diff mbox

[v3,3/3] build: convert xenoprof to Kconfig

Message ID 1455719856-20465-6-git-send-email-cardoe@cardoe.com (mailing list archive)
State New, archived
Headers show

Commit Message

Douglas Goldstein Feb. 17, 2016, 2:37 p.m. UTC
Convert the xenoprof x86 build time option to Kconfig.

CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 xen/arch/x86/Makefile |  2 +-
 xen/arch/x86/Rules.mk |  3 ---
 xen/common/Kconfig    | 14 ++++++++++++++
 xen/common/Makefile   |  2 +-
 4 files changed, 16 insertions(+), 5 deletions(-)

Comments

Jan Beulich Feb. 17, 2016, 3:14 p.m. UTC | #1
>>> On 17.02.16 at 15:37, <cardoe@cardoe.com> wrote:
> --- a/xen/common/Kconfig
> +++ b/xen/common/Kconfig
> @@ -84,6 +84,20 @@ config LATE_HWDOM
>  
>  	  If unsure, say N.
>  
> +# Adds support for Xenoprof
> +config XENOPROF
> +	bool
> +	prompt "Xen Oprofile Support" if EXPERT = "y"
> +	default y

Due to the separate "prompt" this could use "def_bool y".

> --- a/xen/common/Makefile
> +++ b/xen/common/Makefile
> @@ -62,7 +62,7 @@ obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma unlzo unlz4
>  
>  obj-$(perfc)       += perfc.o
>  obj-$(crash_debug) += gdbstub.o
> -obj-$(xenoprof)    += xenoprof.o
> +obj-$(CONFIG_XENOPROF)    += xenoprof.o

Please take the opportunity to add this back at the right slot in the
main section listing objects.

With these two adjustments
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan
diff mbox

Patch

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 434d985..1bcb08b 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -3,7 +3,7 @@  subdir-y += cpu
 subdir-y += genapic
 subdir-y += hvm
 subdir-y += mm
-subdir-$(xenoprof) += oprofile
+subdir-$(CONFIG_XENOPROF) += oprofile
 subdir-y += x86_64
 
 obj-bin-y += alternative.init.o
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index 94e4efd..14519e3 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -3,15 +3,12 @@ 
 
 HAS_NUMA := y
 HAS_CORE_PARKING := y
-xenoprof := y
 
 CFLAGS += -I$(BASEDIR)/include 
 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
 CFLAGS += '-D__OBJECT_LABEL__=$(subst /,$$,$(subst -,_,$(subst $(BASEDIR)/,,$(CURDIR))/$@))'
 
-CFLAGS-$(xenoprof) += -DCONFIG_XENOPROF
-
 # Prevent floating-point variables from creeping into Xen.
 CFLAGS += -msoft-float
 
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 6f404b4..e4ba46d 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -84,6 +84,20 @@  config LATE_HWDOM
 
 	  If unsure, say N.
 
+# Adds support for Xenoprof
+config XENOPROF
+	bool
+	prompt "Xen Oprofile Support" if EXPERT = "y"
+	default y
+	depends on X86
+	---help---
+	  Xen OProfile (Xenoprof) is a system-wide profiler for Xen virtual
+	  machine environments, capable of profiling the Xen virtual machine
+	  monitor, multiple Linux guest operating systems, and applications
+	  running on them.
+
+	  If unsure, say Y.
+
 # Enable/Disable XSM support
 config XSM
 	bool "Xen Security Modules support"
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 6e82b33..126d373 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -62,7 +62,7 @@  obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma unlzo unlz4
 
 obj-$(perfc)       += perfc.o
 obj-$(crash_debug) += gdbstub.o
-obj-$(xenoprof)    += xenoprof.o
+obj-$(CONFIG_XENOPROF)    += xenoprof.o
 
 obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o tmem_xen.o xlat.o)