From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 28/28] Separate runtime debug output from debug symbols Date: Thu, 2 Oct 2014 15:15:41 +0100 Message-ID: <1412259341.17146.18.camel@citrix.com> References: <1412181690-19609-1-git-send-email-olaf@aepfle.de> <1412181690-19609-29-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1412181690-19609-29-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Wei Liu , Keir Fraser , David Scott , Tim Deegan , Stefano Stabellini , Ian Jackson , xen-devel@lists.xen.org, Jan Beulich , Samuel Thibault List-Id: xen-devel@lists.xenproject.org On Wed, 2014-10-01 at 18:41 +0200, Olaf Hering wrote: > With this change debug and debug_symbols is used consistently. > With 'make debug=yn debug_symbols=yn' What does this "yn" syntax do? It's not clear to me what "this change" actually is, perhaps I'm just lacking the context, but could you explain in the commit message what it is you are actually changing. (You could assume I'd never heard of debug_symbols before today, because I hadn't...) > my rebuild time and diskspace > usage goes down: > 105275K clean xen.git checkout. > y 1247041K build time: 5:57 > n 812112K build time: 5:34 > > No change in behaviour is expected by that patch for tools and xen. > For stubdom CFLAGS change from -O1 to O2 with debug=n. > > Signed-off-by: Olaf Hering > Release-Acked-by: Konrad Rzeszutek Wilk > Reviewed-by: Konrad Rzeszutek Wilk > Cc: David Scott > Cc: Ian Campbell > Cc: Ian Jackson > Cc: Jan Beulich > Cc: Keir Fraser > Cc: Samuel Thibault > Cc: Stefano Stabellini > Cc: Tim Deegan > Cc: Wei Liu > --- > stubdom/Makefile | 3 +-- > tools/Makefile | 7 +++++++ > tools/ocaml/common.make | 5 ++++- > xen/Rules.mk | 3 ++- > 4 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/stubdom/Makefile b/stubdom/Makefile > index 9dac103..60dc0b8 100644 > --- a/stubdom/Makefile > +++ b/stubdom/Makefile > @@ -4,9 +4,8 @@ MINI_OS = $(XEN_ROOT)/extras/mini-os > export XEN_OS=MiniOS > > export stubdom=y > -export debug=y > -include $(XEN_ROOT)/Config.mk > -include $(XEN_ROOT)/config/Stubdom.mk > +include $(XEN_ROOT)/Config.mk > > GNU_TARGET_ARCH:=$(XEN_TARGET_ARCH) > ifeq ($(XEN_TARGET_ARCH),x86_32) > diff --git a/tools/Makefile b/tools/Makefile > index 543cd29..884dc91 100644 > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -197,6 +197,12 @@ else > QEMU_XEN_ENABLE_DEBUG := > endif > > +ifeq ($(debug_symbols),y) > +QEMU_XEN_ENABLE_DEBUG_SYMBOLS := --enable-debug-info --disable-strip > +else > +QEMU_XEN_ENABLE_DEBUG_SYMBOLS := --disable-debug-info > +endif > + > subdir-all-qemu-xen-dir: qemu-xen-dir-find > if test -d $(QEMU_UPSTREAM_LOC) ; then \ > source=$(QEMU_UPSTREAM_LOC); \ > @@ -206,6 +212,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find > cd qemu-xen-dir; \ > $$source/configure --enable-xen --target-list=i386-softmmu \ > $(QEMU_XEN_ENABLE_DEBUG) \ > + $(QEMU_XEN_ENABLE_DEBUG_SYMBOLS) \ > --prefix=$(LIBEXEC) \ > --libdir=$(LIBEXEC_LIB) \ > --includedir=$(LIBEXEC_INC) \ > diff --git a/tools/ocaml/common.make b/tools/ocaml/common.make > index d5478f6..33b3142 100644 > --- a/tools/ocaml/common.make > +++ b/tools/ocaml/common.make > @@ -13,7 +13,10 @@ CFLAGS += -fPIC -Werror -I$(shell ocamlc -where) > > OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') > OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F > -OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F > +ifeq ($(debug_symbols),y) > +OCAMLCFLAGS += -g > +endif > +OCAMLCFLAGS += $(OCAMLINCLUDE) -w F -warn-error F > > VERSION := 4.1 > > diff --git a/xen/Rules.mk b/xen/Rules.mk > index a97405c..2d414ab 100644 > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -43,7 +43,8 @@ ALL_OBJS-$(x86) += $(BASEDIR)/crypto/built_in.o > > CFLAGS += -fno-builtin -fno-common > CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith > -CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h > +CFLAGS-$(debug_symbols) += -g > +CFLAGS += -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h > CFLAGS += -nostdinc > > CFLAGS-$(XSM_ENABLE) += -DXSM_ENABLE