aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/zconf.tab.c_shipped
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2005-11-08 21:34:46 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 07:55:53 -0800
commit3f04e7ddf47a1c821dfaa886161d94774af583fa (patch)
treedbe112747d7096ae0b8cbe900e2d19529970001e /scripts/kconfig/zconf.tab.c_shipped
parent[PATCH] schedule obsolete OSS drivers for removal (diff)
downloadlinux-dev-3f04e7ddf47a1c821dfaa886161d94774af583fa.tar.xz
linux-dev-3f04e7ddf47a1c821dfaa886161d94774af583fa.zip
[PATCH] kconfig: Fix Kconfig performance bug
When doing its recursive dependency check, scripts/kconfig/conf uses the flag SYMBOL_CHECK_DONE to avoid rechecking a symbol it has already checked. However, that flag is only set at the top level, so if a symbol is first encountered as a dependency of another symbol it will be rechecked every time it is encountered until it's encountered at the top level. This patch adjusts the flag setting so that each symbol will only be checked once, regardless of whether it is first encountered at the top level, or while recursing down from another symbol. On complex configurations, this vastly speeds up scripts/kconfig/conf. The config in the powerpc merge tree is particularly bad: this patch reduces the time for 'scripts/kconfig/conf -o arch/powerpc/Kconfig' by a factor of 40 on a G5. That's even including the time to print the config, so the speedup in the actual checking is more likely 2 or 3 orders of magnitude. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts/kconfig/zconf.tab.c_shipped')
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index ff4fcc09720e..da12f7b33be3 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1933,10 +1933,7 @@ void conf_parse(const char *name)
exit(1);
menu_finalize(&rootmenu);
for_all_symbols(i, sym) {
- if (!(sym->flags & SYMBOL_CHECKED) && sym_check_deps(sym))
- printf("\n");
- else
- sym->flags |= SYMBOL_CHECK_DONE;
+ sym_check_deps(sym);
}
sym_change_count = 1;