public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tracing/trace_stack: cleanup for trace_lookup_stack()
@ 2009-07-16  6:17 Xiao Guangrong
  2009-07-16  6:21 ` [PATCH 2/2] tracing/function: cleanup for function tracer Xiao Guangrong
  0 siblings, 1 reply; 3+ messages in thread
From: Xiao Guangrong @ 2009-07-16  6:17 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Steven Rostedt, Frederic Weisbecker, LKML

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-17  5:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16  6:17 [PATCH 1/2] tracing/trace_stack: cleanup for trace_lookup_stack() Xiao Guangrong
2009-07-16  6:21 ` [PATCH 2/2] tracing/function: cleanup for function tracer Xiao Guangrong
2009-07-17  5:38   ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox