lkml.org 
[lkml]   [2009]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/2] tracing/trace_stack: cleanup for trace_lookup_stack()
    We can use %pF input format instead of sprint_symbol()
    and %s input format

    Thanks for Li Zefan's offline review.

    Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
    Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
    ---
    kernel/trace/trace_stack.c | 9 +--------
    1 files changed, 1 insertions(+), 8 deletions(-)

    diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
    index e644af9..a4dc8d9 100644
    --- a/kernel/trace/trace_stack.c
    +++ b/kernel/trace/trace_stack.c
    @@ -234,15 +234,8 @@ static void t_stop(struct seq_file *m, void *p)
    static int trace_lookup_stack(struct seq_file *m, long i)
    {
    unsigned long addr = stack_dump_trace[i];
    -#ifdef CONFIG_KALLSYMS
    - char str[KSYM_SYMBOL_LEN];

    - sprint_symbol(str, addr);
    -
    - return seq_printf(m, "%s\n", str);
    -#else
    - return seq_printf(m, "%p\n", (void*)addr);
    -#endif
    + return seq_printf(m, "%pF\n", (void *)addr);
    }

    static void print_disabled(struct seq_file *m)
    --
    1.6.1.2


    \
     
     \ /
      Last update: 2009-07-16 08:21    [W:0.020 / U:147.880 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site