mirror of https://gitee.com/openkylin/linux.git
tracing/trace_stack: Cleanup for trace_lookup_stack()
We can directly use %pF input format instead of sprint_symbol() and %s input format. Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Reviewed-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
This commit is contained in:
parent
64fbcd1628
commit
79173bf556
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue