[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 7 Mar 2023 11:31:42 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lWBcvOeW8FnynRmPGdKKUHqLNmqjQp5RGSOdGHIFaxg=; b=IZUYKiaOkKQ5CgCLXDQR3ikwFvJMkTHD9osC+F8lQ+m3PIbuRRlxU7OXNuTGUSYbLEdgj/x1HUSeI3KNEOh2E4x1QIlfYKabAATr+Pu4wdYD/3PfOlaB9xslR3Kqv38Yd8oWRleB8XpZOZCdLGMq3bPyojpm5hTw9u2p3qnh3Xbu3KWv6zsOKnAdg9iKk0n8tWpnRLaZa06LFg1buL4QmGCb7H/EloaVBF2ejcOWluWiQMwa1CydUA1NwcsDM/f6E4Z0ts+WoFWDaIw3XzAbXzANaYmdR4iMwVbma7WrPMMdXQ8u36f1PNmkPBKhu9f3bPNUBYN87TPgfi30A1KdTw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BAd5sSFMvASeiPS8MVpyEewzrRTyv7t3u5yfgmYbOS3WjyhCXE9sLTT/MLqs682NOIZONAsluAOJ70AGsiSW6sH7X15+gKZu7PLpBszO9wHXr1U6BQMHyQ1LE3wY/Yk8Fg3sbSf85uFOaj/8dKOEk5VjgNu6E4GWmGQ/XXFLKfnD709/90ymk0kyq5vgquEsNFHRlICEMG9iMF3bMSV1mG2QCh51N+EDtsFstgRi/EqG/2AKrdRdIuUteY1hF0N7vecZ4p4gagLhoEl+y15gzNBt95WEMk66SiV1uvHfe7Gs9/0opyabQ3UeS6EYwQn06uwIH45nssUWvEEIq26ANg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 07 Mar 2023 10:32:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.03.2023 07:32, Juergen Gross wrote:
> 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.

In how far does this apply to xen.efi as well? (You can't really use
xen-syms for crash debugging when the crash occurred with xen.efi in
use.)

> 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"). The old gcc
> version selection was based on the assumption, that newer gcc won't
> regress in this regard.

This is good to know, but I'm still curious about the mentioned
differences in symbol addresses: If code generation didn't change, what
caused addresses to differ? Is that merely because individual functions
or objects are emitted in different order by the compiler? (If so I'd
be inclined to infer that comparing generated code must have been
quite a bit of effort, as first of all you would have had to undo that
re-ordering.)

The other thing to at least mention here is that with new enough
binutils, when Dwarf debug info can be enabled for keeping in xen.efi,
linking time of xen.efi increases quite a bit with DEBUG_INFO=y (which
is a result of linking ELF objects into a non-ELF binary, when at
least GNU ld optimizes only the ELF -> ELF case when processing the
[massive amount of] relocations).

> So move CONFIG_DEBUG_INFO out of the section guarded by EXPERT.

Isn't the prior DEBUG dependency as relevant?

> --- a/xen/Kconfig.debug
> +++ b/xen/Kconfig.debug
> @@ -11,6 +11,13 @@ config DEBUG
>  
>         You probably want to say 'N' here.
>  
> +config DEBUG_INFO
> +     bool "Compile Xen with debug info"
> +     default DEBUG
> +     ---help---

Nit: Even if just code movement, please use "help" in the moved
instance.

> +       If you say Y here the resulting Xen will include debugging info
> +       resulting in a larger binary image.
> +
>  if DEBUG || EXPERT

The new placement isn't very helpful when considering some of the ways
kconfig data is presented. At least for the non-graphical presentation
it used to be the case that hierarchies were presented properly only
when dependencies immediately followed their dependents (i.e. here:
DEBUG is a dependent of everything inside the "if" above). Therefore I
think rather than moving the block up you may better move it down past
the "endif".

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.