Skip to contentSkip to conversation

kconfig: recalc symbol value before showing search results

PATCH In review Li Zefan 3 participants 3 messages Mar 19, 2010 – Mar 23, 2010

Subsystems (2)
lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 1/1 kconfig: recalc symbol value before showing search results

A symbol's value won't be recalc-ed until we save config file or enter the menu where the symbol sits.

So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:

Symbol: FUNCTION_GRAPH_TRACER [=y]
Prompt: Kernel Function Graph Tracer

    Defined at kernel/trace/Kconfig:140
    Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])
    ...

From the dependency it should result in FUNCTION_GRAPH_TRACER=n, but it still shows FUNCTION_GRAPH_TRACER=y.

---
 scripts/kconfig/symbol.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/kconfig/symbol.c +1 -0
index 6c8fbbb..dfef8d1 100644
@@ -750,6 +750,7 @@ struct symbol **sym_re_search(const char *pattern)
 				return NULL;
 			}
 		}
+		sym_calc_value(sym);
 		sym_arr[cnt++] = sym;
 	}
 	if (sym_arr)

-- 1.6.3

#1 lore raw
Quoted 9 lines · Li Zefan

A symbol's value won't be recalc-ed until we save config file or enter the menu where the symbol sits.

So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:

Symbol: FUNCTION_GRAPH_TRACER [=y]
Prompt: Kernel Function Graph Tracer
Defined at kernel/trace/Kconfig:140
Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])

[ off topic ]

I'm not sure we need that anymore. I think Thomas added a patch that can disable the cases that gcc causes the function graph to fail.

I pushed a patch before that also runs a check at compile time to make sure that gcc does not produce a bad mcount setup that would screw up the function graph tracer.

http://lkml.org/lkml/2009/11/20/2

It probably still makes sense to add it.

-- Steve

Quoted 28 lines
    ...
Quoted 1 line

From the dependency it should result in FUNCTION_GRAPH_TRACER=n,

but it still shows FUNCTION_GRAPH_TRACER=y.

---
 scripts/kconfig/symbol.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/kconfig/symbol.c +1 -2
index 6c8fbbb..dfef8d1 100644
@@ -750,6 +750,7 @@ struct symbol **sym_re_search(const char *pattern)
 				return NULL;
 			}
 		}
+		sym_calc_value(sym);
 		sym_arr[cnt++] = sym;
 	}
 	if (sym_arr)
-- 1.6.3 
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Li Zefan
Quoted 7 lines · Li Zefan

A symbol's value won't be recalc-ed until we save config file or enter the menu where the symbol sits.

So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:

Symbol: FUNCTION_GRAPH_TRACER [=y]
Prompt: Kernel Function Graph Tracer

Quoted 8 lines
    Defined at kernel/trace/Kconfig:140
    Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])
    ...

From the dependency it should result in FUNCTION_GRAPH_TRACER=n, but it still shows FUNCTION_GRAPH_TRACER=y.

Nice, applied.

Michal