Skip to contentSkip to conversation

Disable debug build for hypervisor

PATCH In review Wei Liu 5 participants 19 messages Oct 31, 2016 – Nov 1, 2016

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

cover Disable debug build for hypervisor

I think this is new in this release. Please check if this is the correct approach.

Cc Andrew Cooper <[email protected]>
Cc George Dunlap <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Tim Deegan <[email protected]>
Cc Wei Liu <[email protected]>

Wei Liu (2):
xen: disable debug build
Config.mk: fix comment for debug option

 Config.mk         | 3 ++-
 xen/Kconfig.debug | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#1 lore raw

PATCH 1/2 xen: disable debug build

Xen debug build is controlled by Kconfig.

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

---
 xen/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/Kconfig.debug +1 -1
index e9f7dcd..b3bb085 100644
@@ -3,7 +3,7 @@ menu "Debugging Options"
 
 config DEBUG
 	bool "Developer Checks"
-	default y
+	default n
 	---help---
 	  If you say Y here this will enable developer checks such as asserts
 	  and extra printks. This option is intended for development purposes
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#2 lore raw

PATCH 2/2 Config.mk: fix comment for debug option

In reply to Wei Liu

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

---
 Config.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Config.mk +2 -1
index ebbd9c0..fb836a4 100644
@@ -16,7 +16,8 @@ or       = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(
 
 -include $(XEN_ROOT)/.config
 
-# A debug build of Xen and tools?
+# A debug build of tools?
+# Hypervisor debug build is controlled by Kconfig.
 debug ?= n
 debug_symbols ?= $(debug)
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author
#3 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 19 lines · Wei Liu

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

---
 Config.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Config.mk +0 -0
index ebbd9c0..fb836a4 100644

Config.mk or = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$( · line 19

Quoted 5 lines
Config.mk +1 -1
@@ -16,7 +16,8 @@ or       = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(
 
 -include $(XEN_ROOT)/.config
 
-# A debug build of Xen and tools?
+# A debug build of tools?

For this to hold true, a patch like this is needed:

Please let me know what you think.

---8<---
From 0a96ff9f3610622bc4f7114d6e094bf45ca9305f Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Mon, 31 Oct 2016 17:42:25 +0000
Subject: [PATCH] build: make debug option affect tools only

The debug option in Config.mk affects hypervisor, tools and stubdom by appending different flags to CFLAGS.

It is undesirable because now hypervisor build is affect by both Kconfig and debug.

Disentangle the semantics of debug by pushing relevant options to individual sub-systems.

For hypervisor, the flags previously added by debug option is now controlled by CONFIG_DEBUG.

For tools, flags are moved from config/*.mk into tools/Rules.mk.

For stubdom, it is a bit special because it unilaterally sets debug all the time, and it also inherits CFLAGS from the source package it tries to build. It should be fine to not inherit any flags from Xen build system because they will be overridden by source packages anyway.

Specifically there are some considerations on how the flags are picked:

1. we don't need -fno-optimize-sibling-calls anymore because gcc doc indicates that it is not enabled for -O1, which we already set in the debug build.
2. for tools we use -O0 -g3 in Rules.mk because they already take precedence over the flags set in config/*.mk.
3. for hypervisor we don't add -fno-omit-frame-pointer to debug build because that's controlled by CONFIG_FRAME_POINTER.

The debug option in Config.mk will only affect tools components after this patch is applied.

---
 config/StdGNU.mk | 8 --------
 config/SunOS.mk  | 7 -------
 tools/Rules.mk   | 4 +++-
 xen/Rules.mk     | 6 ++++++
 4 files changed, 9 insertions(+), 16 deletions(-)
config/StdGNU.mk +0 -8
index 39d36b2..6be8233 100644
@@ -35,14 +35,6 @@ UTIL_LIBS = -lutil
 SONAME_LDFLAG = -soname
 SHLIB_LDFLAGS = -shared
 
-ifneq ($(debug),y)
-CFLAGS += -O2 -fomit-frame-pointer
-else
-# Less than -O1 produces bad code and large stack frames
-CFLAGS += -O1 -fno-omit-frame-pointer
-CFLAGS-$(gcc) += -fno-optimize-sibling-calls
-endif
-
 ifeq ($(lto),y)
 CFLAGS += -flto
 LDFLAGS-$(clang) += -plugin LLVMgold.so
config/SunOS.mk +0 -7
index 86a384d..0fe5f45 100644
@@ -31,12 +31,5 @@ UTIL_LIBS =
 SONAME_LDFLAG = -h
 SHLIB_LDFLAGS = -R $(SunOS_LIBDIR) -shared
 
-ifneq ($(debug),y)
-CFLAGS += -O2 -fno-omit-frame-pointer
-else
-# Less than -O1 produces bad code and large stack frames
-CFLAGS += -O1 -fno-omit-frame-pointer
-endif
-
 CFLAGS += -Wa,--divide -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__
 
tools/Rules.mk +3 -1
index 5a80fec..0e73690 100644
@@ -138,9 +138,11 @@ SHLIB_libxenvchan  = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN)
 
 ifeq ($(debug),y)
 # Disable optimizations and enable debugging information for macros
-CFLAGS += -O0 -g3
+CFLAGS += -O0 -g3 -fno-omit-frame-pointer
 # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>.
 PY_CFLAGS += $(PY_NOOPT_CFLAGS)
+else
+CFLAGS += -O2 -fomit-frame-pointer
 endif
 
 LIBXL_BLKTAP ?= $(CONFIG_BLKTAP2)
xen/Rules.mk +6 -0
index a9fda71..08cc776 100644
@@ -46,6 +46,12 @@ ALL_OBJS-y               += $(BASEDIR)/xsm/built_in.o
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 ALL_OBJS-$(CONFIG_CRYPTO)   += $(BASEDIR)/crypto/built_in.o
 
+ifeq ($(CONFIG_DEBUG),y)
+CFLAGS += -O1
+else
+CFLAGS += -O2 -fomit-frame-pointer
+endif
+
 CFLAGS += -nostdinc -fno-builtin -fno-common
 CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
 CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#4 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 21 lines · Wei Liu
Quoted 20 lines · Wei Liu

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

---
 Config.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Config.mk +0 -0
index ebbd9c0..fb836a4 100644
@@ -16,7 +16,8 @@ or       = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(
 
Quoted 7 lines

Config.mk or = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$( · line 19

Quoted 4 lines
Config.mk +1 -1
 -include $(XEN_ROOT)/.config
 
-# A debug build of Xen and tools?
+# A debug build of tools?

For this to hold true, a patch like this is needed:

Please let me know what you think.

Looks like another swamp :s

Quoted 88 lines

---8<---
From 0a96ff9f3610622bc4f7114d6e094bf45ca9305f Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Mon, 31 Oct 2016 17:42:25 +0000
Subject: [PATCH] build: make debug option affect tools only

The debug option in Config.mk affects hypervisor, tools and stubdom by appending different flags to CFLAGS.

It is undesirable because now hypervisor build is affect by both Kconfig and debug.

Disentangle the semantics of debug by pushing relevant options to individual sub-systems.

For hypervisor, the flags previously added by debug option is now controlled by CONFIG_DEBUG.

For tools, flags are moved from config/*.mk into tools/Rules.mk.

For stubdom, it is a bit special because it unilaterally sets debug all the time, and it also inherits CFLAGS from the source package it tries to build. It should be fine to not inherit any flags from Xen build system because they will be overridden by source packages anyway.

Specifically there are some considerations on how the flags are picked:

1. we don't need -fno-optimize-sibling-calls anymore because gcc doc indicates that it is not enabled for -O1, which we already set in the debug build.
2. for tools we use -O0 -g3 in Rules.mk because they already take precedence over the flags set in config/*.mk.
3. for hypervisor we don't add -fno-omit-frame-pointer to debug build because that's controlled by CONFIG_FRAME_POINTER.

The debug option in Config.mk will only affect tools components after this patch is applied.

---
 config/StdGNU.mk | 8 --------
 config/SunOS.mk  | 7 -------
 tools/Rules.mk   | 4 +++-
 xen/Rules.mk     | 6 ++++++
 4 files changed, 9 insertions(+), 16 deletions(-)
config/StdGNU.mk +0 -8
index 39d36b2..6be8233 100644
@@ -35,14 +35,6 @@ UTIL_LIBS = -lutil
 SONAME_LDFLAG = -soname
 SHLIB_LDFLAGS = -shared
 
-ifneq ($(debug),y)
-CFLAGS += -O2 -fomit-frame-pointer
-else
-# Less than -O1 produces bad code and large stack frames
-CFLAGS += -O1 -fno-omit-frame-pointer
-CFLAGS-$(gcc) += -fno-optimize-sibling-calls
-endif
-
 ifeq ($(lto),y)
 CFLAGS += -flto
 LDFLAGS-$(clang) += -plugin LLVMgold.so
config/SunOS.mk +0 -7
index 86a384d..0fe5f45 100644
@@ -31,12 +31,5 @@ UTIL_LIBS =
 SONAME_LDFLAG = -h
 SHLIB_LDFLAGS = -R $(SunOS_LIBDIR) -shared
 
-ifneq ($(debug),y)
-CFLAGS += -O2 -fno-omit-frame-pointer
-else
-# Less than -O1 produces bad code and large stack frames
-CFLAGS += -O1 -fno-omit-frame-pointer
-endif
-
 CFLAGS += -Wa,--divide -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__
 
tools/Rules.mk +0 -0
index 5a80fec..0e73690 100644

tools/Rules.mk SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) · line 141

Quoted 5 lines
tools/Rules.mk +1 -1
@@ -138,9 +138,11 @@ SHLIB_libxenvchan  = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN)
 
 ifeq ($(debug),y)
 # Disable optimizations and enable debugging information for macros
-CFLAGS += -O0 -g3
+CFLAGS += -O0 -g3 -fno-omit-frame-pointer

Perhaps this a suggestion better left for a later patch, but the use of -O0 is still bad here.

Debug builds should use -Og if available, and -O1 otherwise. As identified immediately below, a number of options are incompatible with -O0.

Quoted 12 lines
tools/Rules.mk +2 -0
 # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>.
 PY_CFLAGS += $(PY_NOOPT_CFLAGS)
+else
+CFLAGS += -O2 -fomit-frame-pointer
 endif
 
 LIBXL_BLKTAP ?= $(CONFIG_BLKTAP2)
xen/Rules.mk +0 -0
index a9fda71..08cc776 100644

xen/Rules.mk ALL_OBJS-y += $(BASEDIR)/xsm/built_in.o · line 52

Quoted 7 lines
xen/Rules.mk +4 -0
@@ -46,6 +46,12 @@ ALL_OBJS-y               += $(BASEDIR)/xsm/built_in.o
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 ALL_OBJS-$(CONFIG_CRYPTO)   += $(BASEDIR)/crypto/built_in.o
 
+ifeq ($(CONFIG_DEBUG),y)
+CFLAGS += -O1
+else
+CFLAGS += -O2 -fomit-frame-pointer

The frame pointer option should be omitted entirely. A user should be able to control debug and frame pointer entirely independently with Kconfig.

There have been two times where I have specifically needed a release build with frame pointers to track down bugs.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#5 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 24 lines · Andrew Cooper
Quoted 23 lines · Wei Liu
Quoted 22 lines · Wei Liu

---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>

---
 Config.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Config.mk +0 -0
index ebbd9c0..fb836a4 100644
@@ -16,7 +16,8 @@ or       = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(
 
 -include $(XEN_ROOT)/.config
 
Quoted 8 lines
Quoted 5 lines

Config.mk or = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$( · line 19

Quoted 2 lines
Config.mk +1 -1
-# A debug build of Xen and tools?
+# A debug build of tools?

For this to hold true, a patch like this is needed:

Please let me know what you think.

Looks like another swamp :s

Indeed. This is something we overlooked early in the release.

Quoted 7 lines
Quoted 7 lines

---8<---
From 0a96ff9f3610622bc4f7114d6e094bf45ca9305f Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Mon, 31 Oct 2016 17:42:25 +0000
Subject: [PATCH] build: make debug option affect tools only

Quoted 6 lines
Quoted 6 lines

The debug option in Config.mk affects hypervisor, tools and stubdom by appending different flags to CFLAGS.

It is undesirable because now hypervisor build is affect by both Kconfig and debug.

^
Specifically because of this, I really want to fix this whole thing properly. Otherwise it is going to be rather confusing to downstream.

Quoted 8 lines
Quoted 8 lines

Disentangle the semantics of debug by pushing relevant options to individual sub-systems.

For hypervisor, the flags previously added by debug option is now controlled by CONFIG_DEBUG.

For tools, flags are moved from config/*.mk into tools/Rules.mk.

[...]

Quoted 40 lines

tools/Rules.mk SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) · line 141

Quoted 10 lines
tools/Rules.mk +1 -1
index 5a80fec..0e73690 100644
@@ -138,9 +138,11 @@ SHLIB_libxenvchan  = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN)
 
 ifeq ($(debug),y)
 # Disable optimizations and enable debugging information for macros
-CFLAGS += -O0 -g3
+CFLAGS += -O0 -g3 -fno-omit-frame-pointer

Perhaps this a suggestion better left for a later patch, but the use of -O0 is still bad here.

Debug builds should use -Og if available, and -O1 otherwise. As identified immediately below, a number of options are incompatible with -O0.

Quoted 12 lines
tools/Rules.mk +2 -0
 # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>.
 PY_CFLAGS += $(PY_NOOPT_CFLAGS)
+else
+CFLAGS += -O2 -fomit-frame-pointer
 endif
 
 LIBXL_BLKTAP ?= $(CONFIG_BLKTAP2)
xen/Rules.mk +0 -0
index a9fda71..08cc776 100644

xen/Rules.mk ALL_OBJS-y += $(BASEDIR)/xsm/built_in.o · line 52

Quoted 7 lines
xen/Rules.mk +4 -0
@@ -46,6 +46,12 @@ ALL_OBJS-y               += $(BASEDIR)/xsm/built_in.o
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 ALL_OBJS-$(CONFIG_CRYPTO)   += $(BASEDIR)/crypto/built_in.o
 
+ifeq ($(CONFIG_DEBUG),y)
+CFLAGS += -O1
+else
+CFLAGS += -O2 -fomit-frame-pointer

The frame pointer option should be omitted entirely. A user should be able to control debug and frame pointer entirely independently with Kconfig.

Quoted 3 lines

There have been two times where I have specifically needed a release build with frame pointers to track down bugs.

I think both are fine suggestions.

I would like to (hopefully) not introduce noticeable changes of the effect of all combined flags in this patch and adjust the flags in a later patch.

Wei.

Quoted 1 line

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#6 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

In reply to Wei Liu
Quoted 6 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 2:48 PM >>>

config/StdGNU.mk | 8 --------
config/SunOS.mk  | 7 -------
tools/Rules.mk   | 4 +++-
xen/Rules.mk     | 6 ++++++
4 files changed, 9 insertions(+), 16 deletions(-)

Considering this diffstat - did the original global settings not get inherited by any of the other subtrees, namely stubdom/ and/or extras/ ?

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#7 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 10 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 2:48 PM >>>

config/StdGNU.mk | 8 --------
config/SunOS.mk  | 7 -------
tools/Rules.mk   | 4 +++-
xen/Rules.mk     | 6 ++++++
4 files changed, 9 insertions(+), 16 deletions(-)

Considering this diffstat - did the original global settings not get inherited by any of the other subtrees, namely stubdom/ and/or extras/ ?

I mentioned this in commit message and deliberately made the decision to not inherit these flags for stubdom build.

Wei.

Quoted 2 lines

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#8 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 9 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 5:20 PM >>>

Quoted 7 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 2:48 PM >>>

config/StdGNU.mk | 8 --------
config/SunOS.mk  | 7 -------
tools/Rules.mk   | 4 +++-
xen/Rules.mk     | 6 ++++++
4 files changed, 9 insertions(+), 16 deletions(-)
Quoted 5 lines
Quoted 2 lines

Considering this diffstat - did the original global settings not get inherited by any of the other subtrees, namely stubdom/ and/or extras/ ?

I mentioned this in commit message and deliberately made the decision to not inherit these flags for stubdom build.

Indeed, I've overlooked that part, but I'm not fully convinced. And then extras/ and possible other subtrees don't get mentioned (at the very least I'd expect a sentence clarifying that no other subtrees are affected, but as said at least for extras/ I'm not sure: That's where mini-os gets linked in, and I don't recall whether its build machinery got fully separated).

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#9 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 9 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 5:20 PM >>>

Quoted 7 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 2:48 PM >>>

config/StdGNU.mk | 8 --------
config/SunOS.mk  | 7 -------
tools/Rules.mk   | 4 +++-
xen/Rules.mk     | 6 ++++++
4 files changed, 9 insertions(+), 16 deletions(-)
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Considering this diffstat - did the original global settings not get inherited by any of the other subtrees, namely stubdom/ and/or extras/ ?

I mentioned this in commit message and deliberately made the decision to not inherit these flags for stubdom build.

Indeed, I've overlooked that part, but I'm not fully convinced. And then

Not fully convinced because? Can you be more specific?

Quoted 6 lines

extras/ and possible other subtrees don't get mentioned (at the very least I'd expect a sentence clarifying that no other subtrees are affected, but as said at least for extras/ I'm not sure: That's where mini-os gets linked in, and I don't recall whether its build machinery got fully separated).

Mini-os got its own build system after I separated it out from Xen.git. It should be dealt with separately if necessary. I can mention that in commit message as well.

Wei.

Quoted 2 lines

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#10 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 14 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 5:38 PM >>>

Quoted 12 lines · Jan Beulich
Quoted 12 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 5:20 PM >>>

Quoted 9 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 2:48 PM >>>

config/StdGNU.mk | 8 --------
config/SunOS.mk  | 7 -------
tools/Rules.mk   | 4 +++-
xen/Rules.mk     | 6 ++++++
4 files changed, 9 insertions(+), 16 deletions(-)

Considering this diffstat - did the original global settings not get inherited by any of the other subtrees, namely stubdom/ and/or extras/ ?

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

I mentioned this in commit message and deliberately made the decision to not inherit these flags for stubdom build.

Indeed, I've overlooked that part, but I'm not fully convinced. And then

Not fully convinced because? Can you be more specific?

I don't know very much about the stubdom build machinery, but I could easily imaging some top level setting to have made it through to some of the sub-components, in which case this change would have a functional impact.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#11 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 17 lines · Jan Beulich
Quoted 17 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 5:38 PM >>>

Quoted 15 lines · Jan Beulich
Quoted 14 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 5:20 PM >>>

Quoted 9 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line

Wei Liu <[email protected]> 11/01/16 2:48 PM >>>

config/StdGNU.mk | 8 --------
config/SunOS.mk  | 7 -------
tools/Rules.mk   | 4 +++-
xen/Rules.mk     | 6 ++++++
4 files changed, 9 insertions(+), 16 deletions(-)

Considering this diffstat - did the original global settings not get inherited by any of the other subtrees, namely stubdom/ and/or extras/ ?

I mentioned this in commit message and deliberately made the decision to not inherit these flags for stubdom build.

Quoted 9 lines
Quoted 3 lines
Quoted 1 line

Indeed, I've overlooked that part, but I'm not fully convinced. And then

Not fully convinced because? Can you be more specific?

I don't know very much about the stubdom build machinery, but I could easily imaging some top level setting to have made it through to some of the sub-components, in which case this change would have a functional impact.

I don't feel strongly about this. I can move some flags into stubdom build system as well, just to err on the safe side.

Wei.

Quoted 2 lines

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#12 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

In reply to Wei Liu

Wei Liu writes ("Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option"):

Quoted 7 lines · Wei Liu

Review

Quoted 2 lines
(quoted diff) +1 -1
-# A debug build of Xen and tools?
+# A debug build of tools?

For this to hold true, a patch like this is needed:

Please let me know what you think.

...

Quoted 2 lines

For hypervisor, the flags previously added by debug option is now controlled by CONFIG_DEBUG.

So there will no longer be one place where debug is enabled. That's a shame. It would need to come with an osstest patch...

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#13 lore raw

Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option

Quoted 6 lines · Ian Jackson

Wei Liu writes ("Re: [PATCH for-4.8 2/2] Config.mk: fix comment for debug option"):

Quoted 5 lines · Wei Liu

Review

Quoted 2 lines
(quoted diff) +1 -1
-# A debug build of Xen and tools?
+# A debug build of tools?

For this to hold true, a patch like this is needed:

Quoted 6 lines
Quoted 1 line

Please let me know what you think.

...

Quoted 2 lines

For hypervisor, the flags previously added by debug option is now controlled by CONFIG_DEBUG.

So there will no longer be one place where debug is enabled. That's a shame. It would need to come with an osstest patch...

It hasn't been the case for almost all of 4.8

Attempting to build Xen with an explicit debug= set yields "You must use 'make menuconfig' to enable/disable debug now."

I personally would prefer if debug= still worked, but apparently that is prohibitively difficult to do.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#14 lore raw

PATCH 1/1 ts-xen-build: set CONFIG_DEBUG for KConfig

In reply to Ian Jackson

Starting from Xen 4.8 the hypervisor debug build is controlled by Kconfig. Set it correctly in xen/.config.

---
 ts-xen-build | 1 +
 1 file changed, 1 insertion(+)
ts-xen-build +1 -0
index 07a69ec..3e53d74 100755
@@ -86,6 +86,7 @@ END
 	if test -f xen/Kconfig; then
 		echo >>xen/.config CONFIG_XSM='${build_xsm}'
 		echo >>xen/.config CONFIG_FLASK='${build_xsm}'
+		echo >>xen/.config CONFIG_DEBUG=$debug_build
 	fi
 	echo >>.config XSM_ENABLE='${build_xsm}'
 END
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#15 lore raw

Re: [OSSTEST PATCH] ts-xen-build: set CONFIG_DEBUG for KConfig

Wei Liu writes ("[OSSTEST PATCH] ts-xen-build: set CONFIG_DEBUG for KConfig"):

Quoted 4 lines

Starting from Xen 4.8 the hypervisor debug build is controlled by Kconfig. Set it correctly in xen/.config.

Thanks. Pushed to osstest pretest.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#16 lore raw
In reply to Wei Liu
Quoted 1 line · Wei Liu

I think this is new in this release.

I believe so.

Quoted 12 lines

Please check if this is the correct
approach.

Cc Andrew Cooper <[email protected]>
Cc George Dunlap <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Tim Deegan <[email protected]>
Cc Wei Liu <[email protected]>
Quoted 3 lines

Wei Liu (2):
xen: disable debug build
Config.mk: fix comment for debug option

Both Reviewed-by: Andrew Cooper <[email protected]>

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#18 lore raw
In reply to Andrew Cooper
Quoted 17 lines · Andrew Cooper
Quoted 1 line · Wei Liu

I think this is new in this release.

I believe so.

Quoted 12 lines

Please check if this is the correct
approach.

Cc Andrew Cooper <[email protected]>
Cc George Dunlap <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Tim Deegan <[email protected]>
Cc Wei Liu <[email protected]>
Quoted 5 lines
Quoted 3 lines

Wei Liu (2):
xen: disable debug build
Config.mk: fix comment for debug option

Both Reviewed-by: Andrew Cooper <[email protected]>

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel