tracing/function-graph-tracer: drop the kernel_text_address check
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 7 Feb 2009 23:04:02 +0000 (00:04 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 9 Feb 2009 09:51:38 +0000 (10:51 +0100)
When the function graph tracer picks a return address, it ensures this address
is really a kernel text one by calling __kernel_text_address()

Actually this path has never been taken.Its role was more likely to debug the tracer
on the beginning of its development but this function is wasteful since it is called
for every traced function.

The fault check is already sufficient.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/ftrace.c
kernel/extable.c
kernel/module.c

index d74d75e0952d4a680b7bec08f51bb9731bdac2a7..18828aee87815704bad6571fe69d3ead9f56cd55 100644 (file)
@@ -491,13 +491,6 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
                return;
        }
 
-       if (unlikely(!__kernel_text_address(old))) {
-               ftrace_graph_stop();
-               *parent = old;
-               WARN_ON(1);
-               return;
-       }
-
        calltime = cpu_clock(raw_smp_processor_id());
 
        if (push_return_trace(old, calltime,
index e136ed8d82ba56ab81283a48fe3d6cfb41c23c79..0df6253730bedff8ab66a0aa8dfbe9968db0b564 100644 (file)
@@ -41,7 +41,7 @@ const struct exception_table_entry *search_exception_tables(unsigned long addr)
        return e;
 }
 
-__notrace_funcgraph int core_kernel_text(unsigned long addr)
+int core_kernel_text(unsigned long addr)
 {
        if (addr >= (unsigned long)_stext &&
            addr <= (unsigned long)_etext)
@@ -54,7 +54,7 @@ __notrace_funcgraph int core_kernel_text(unsigned long addr)
        return 0;
 }
 
-__notrace_funcgraph int __kernel_text_address(unsigned long addr)
+int __kernel_text_address(unsigned long addr)
 {
        if (core_kernel_text(addr))
                return 1;
index ba22484a987eb96a9d2bff0cdeede4b62a1d7156..22d7379709da83d8d7bdab21bc8f88f71bffc848 100644 (file)
@@ -2735,7 +2735,7 @@ int is_module_address(unsigned long addr)
 
 
 /* Is this a valid kernel address? */
-__notrace_funcgraph struct module *__module_text_address(unsigned long addr)
+struct module *__module_text_address(unsigned long addr)
 {
        struct module *mod;