Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752851AbbFKMc7 (ORCPT ); Thu, 11 Jun 2015 08:32:59 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:33707 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbbFKMcv (ORCPT ); Thu, 11 Jun 2015 08:32:51 -0400 From: Rasmus Villemoes To: Michal Marek Cc: Andrew Morton , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kbuild: include core debug info when DEBUG_INFO_REDUCED Organization: D03 References: <1426902601-13524-1-git-send-email-linux@rasmusvillemoes.dk> X-Hashcash: 1:20:150611:mmarek@suse.cz::YkKIcRIJ58/iZHL2:0000+Td X-Hashcash: 1:20:150611:akpm@linux-foundation.org::OLoDqbzYD8uxyoU0:0000000000000000000000000000000000003NOh X-Hashcash: 1:20:150611:linux-kernel@vger.kernel.org::7pEGhc9XISnCJRxs:0000000000000000000000000000000005s6W X-Hashcash: 1:20:150611:linux-kbuild@vger.kernel.org::shjCXj67kTW88Gq/:0000000000000000000000000000000009C33 Date: Thu, 11 Jun 2015 14:32:48 +0200 In-Reply-To: <1426902601-13524-1-git-send-email-linux@rasmusvillemoes.dk> (Rasmus Villemoes's message of "Sat, 21 Mar 2015 02:50:01 +0100") Message-ID: <87eglie87j.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1751 Lines: 39 On Sat, Mar 21 2015, Rasmus Villemoes wrote: > With CONFIG_DEBUG_INFO_REDUCED, we do get quite a lot of debug info > (around 22.7 MB for a defconfig+DEBUG_INFO_REDUCED). However, the > "basenames must match" rule used by -femit-struct-debug-baseonly > option means that we miss some core data structures, such as struct > {device, file, inode, mm_struct, page} etc. > > We can easily get these included as well, while still getting the > benefits of CONFIG_DEBUG_INFO_REDUCED (faster build times and smaller > individual object files): All it takes is a dummy translation unit > including a few strategic headers and compiled with a flag overriding > -femit-struct-debug-baseonly. > > This increases the size of .debug_info by ~0.3%, but these 90 KB > contain some rather useful info. > Any comments on this patch? I know it's a little hacky, but I do find it rather useful. For example, I just noticed that pahole shows this struct audit_names { struct list_head list; /* 0 0 */ /* XXX 16 bytes hole, try to pack */ when applied to a vmlinux built with DEBUG_INFO_REDUCED, since debug info for struct list_head is not included. The same is true for a lot of other types which are often embedded in structs (e.g. spinlock_t and atomic_t). I could of course just compile without DEBUG_INFO_REDUCED, but the time and space savings of that are real and sad to lose (my tree is 1.8 GB larger when I compile without it). Rasmus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/