diff options
author | Andi Kleen <ak@linux.intel.com> | 2013-02-07 16:58:40 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2013-02-22 07:45:56 -0500 |
commit | e82c4bb8b457926e13d4dd3aacbb8e573daede23 (patch) | |
tree | cc41684965e8efde6de455e5f67940ba814eafaf | |
parent | 8937e897181a411f73faf4da83c452c7b0732929 (diff) |
Kbuild: Disable var tracking with CONFIG_DEBUG_INFO_REDUCED
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>
Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -618,7 +618,8 @@ KBUILD_AFLAGS += -gdwarf-2 | |||
618 | endif | 618 | endif |
619 | 619 | ||
620 | ifdef CONFIG_DEBUG_INFO_REDUCED | 620 | ifdef CONFIG_DEBUG_INFO_REDUCED |
621 | KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) | 621 | KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ |
622 | $(call cc-option,-fno-var-tracking) | ||
622 | endif | 623 | endif |
623 | 624 | ||
624 | ifdef CONFIG_FUNCTION_TRACER | 625 | ifdef CONFIG_FUNCTION_TRACER |