mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Kbuild: Disable var tracking with CONFIG_DEBUG_INFO_REDUCED
@ 2013-02-07 21:58 Andi Kleen
  2013-02-22 12:47 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2013-02-07 21:58 UTC (permalink / raw)
  To: mmarek; +Cc: linux-kbuild, linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Newer gcc enables the var-tracking pass with -g to keep track which
registers contain which variables. This is one of the slower passes in gcc.

With reduced debug info (aimed at objdump -S, but not using a full debugger)
we don't need this fine grained tracking. But it was still enabled
because -g was enabled. Disable it explicitely for DEBUG_INFO_REDUCED.

On my 8T workstation this gives me about a 12 second gain in building
a reasonable kernel config (2min16 vs 2min28) with DEBUG_INFO_REDUCED.
With full DEBUG_INFO it takes 2min46

The actual improvement in user time taken by the compiler is much higher
(all CPU combined user time 15min5s vs 16m30 before)
but the usual amdahl bottleneck on the linker prevents more speedup.
It still saves some more energy and keeps cycles for other things.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 54dfde5..7e423df 100644
--- a/Makefile
+++ b/Makefile
@@ -619,7 +619,8 @@ KBUILD_AFLAGS	+= -gdwarf-2
 endif
 
 ifdef CONFIG_DEBUG_INFO_REDUCED
-KBUILD_CFLAGS 	+= $(call cc-option, -femit-struct-debug-baseonly)
+KBUILD_CFLAGS 	+= $(call cc-option, -femit-struct-debug-baseonly) \
+		   $(call cc-option,-fno-var-tracking)
 endif
 
 ifdef CONFIG_FUNCTION_TRACER
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Kbuild: Disable var tracking with CONFIG_DEBUG_INFO_REDUCED
  2013-02-07 21:58 [PATCH] Kbuild: Disable var tracking with CONFIG_DEBUG_INFO_REDUCED Andi Kleen
@ 2013-02-22 12:47 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2013-02-22 12:47 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kbuild, linux-kernel, Andi Kleen

On Thu, Feb 07, 2013 at 01:58:40PM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> Newer gcc enables the var-tracking pass with -g to keep track which
> registers contain which variables. This is one of the slower passes in gcc.
> 
> With reduced debug info (aimed at objdump -S, but not using a full debugger)
> we don't need this fine grained tracking. But it was still enabled
> because -g was enabled. Disable it explicitely for DEBUG_INFO_REDUCED.

Applied to kbuild.git#kbuild, thanks.

Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-22 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07 21:58 [PATCH] Kbuild: Disable var tracking with CONFIG_DEBUG_INFO_REDUCED Andi Kleen
2013-02-22 12:47 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®