Message ID | 20230405135629.21829-2-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen: some CONFIG_DEBUG_INFO changes | expand |
Hi Juergen, > From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Juergen Gross > Sent: Wednesday, April 5, 2023 3:56 PM > To: xen-devel@lists.xenproject.org > Cc: Juergen Gross <jgross@suse.com>; Andrew Cooper <andrew.cooper3@citrix.com>; George Dunlap <george.dunlap@citrix.com>; Jan > Beulich <jbeulich@suse.com>; Julien Grall <julien@xen.org>; Stefano Stabellini <sstabellini@kernel.org>; Wei Liu <wl@xen.org> > Subject: [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section > > In order to support hypervisor analysis of crash dumps, xen-syms needs > to contain debug_info. It should be allowed to configure the hypervisor > to be built with CONFIG_DEBUG_INFO in non-debug builds without having > to enable EXPERT. > > Using a rather oldish gcc (7.5) it was verified that code generation > doesn't really differ between CONFIG_DEBUG_INFO on or off without > CONFIG_DEBUG being set (only observed differences were slightly > different symbol addresses, verified via "objdump -d", resulting from > the different config.gz in the binary). The old gcc version selection > was based on the assumption, that newer gcc won't regress in this > regard. > > So move CONFIG_DEBUG_INFO out of the section guarded by EXPERT. > > It should be mentioned that there have been reports that the linking > of the xen.efi might take considerably longer with CONFIG_DEBUG_INFO > selected when using newer binutils. > > Signed-off-by: Juergen Gross <jgross@suse.com> > --- > V2: > - expanded commit message (Jan Beulich) > V3: > - move DEBUG_INFO block to the end of the file (Jan Beulich) > --- > xen/Kconfig.debug | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug > index fad3050d4f..279dbe8274 100644 > --- a/xen/Kconfig.debug > +++ b/xen/Kconfig.debug > @@ -28,13 +28,6 @@ config GDBSX > If you want to enable support for debugging guests from dom0 via > gdbsx then say Y. > > -config DEBUG_INFO > - bool "Compile Xen with debug info" > - default y > - ---help--- > - If you say Y here the resulting Xen will include debugging info > - resulting in a larger binary image. > - > config FRAME_POINTER > bool "Compile Xen with frame pointers" > default DEBUG > @@ -132,4 +125,11 @@ source "arch/$(SRCARCH)/Kconfig.debug" > > endif # DEBUG || EXPERT > > +config DEBUG_INFO > + bool "Compile Xen with debug info" > + default DEBUG > + help > + If you say Y here the resulting Xen will include debugging info > + resulting in a larger binary image. > + > endmenu > -- > 2.35.3 > For the non-efi xen: Tested-by: Dietmar Hahn <dietmar.hahn@fujitsu.com> Dietmar.
diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index fad3050d4f..279dbe8274 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -28,13 +28,6 @@ config GDBSX If you want to enable support for debugging guests from dom0 via gdbsx then say Y. -config DEBUG_INFO - bool "Compile Xen with debug info" - default y - ---help--- - If you say Y here the resulting Xen will include debugging info - resulting in a larger binary image. - config FRAME_POINTER bool "Compile Xen with frame pointers" default DEBUG @@ -132,4 +125,11 @@ source "arch/$(SRCARCH)/Kconfig.debug" endif # DEBUG || EXPERT +config DEBUG_INFO + bool "Compile Xen with debug info" + default DEBUG + help + If you say Y here the resulting Xen will include debugging info + resulting in a larger binary image. + endmenu
In order to support hypervisor analysis of crash dumps, xen-syms needs to contain debug_info. It should be allowed to configure the hypervisor to be built with CONFIG_DEBUG_INFO in non-debug builds without having to enable EXPERT. Using a rather oldish gcc (7.5) it was verified that code generation doesn't really differ between CONFIG_DEBUG_INFO on or off without CONFIG_DEBUG being set (only observed differences were slightly different symbol addresses, verified via "objdump -d", resulting from the different config.gz in the binary). The old gcc version selection was based on the assumption, that newer gcc won't regress in this regard. So move CONFIG_DEBUG_INFO out of the section guarded by EXPERT. It should be mentioned that there have been reports that the linking of the xen.efi might take considerably longer with CONFIG_DEBUG_INFO selected when using newer binutils. Signed-off-by: Juergen Gross <jgross@suse.com> --- V2: - expanded commit message (Jan Beulich) V3: - move DEBUG_INFO block to the end of the file (Jan Beulich) --- xen/Kconfig.debug | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)