diff options
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/timer_list.c | 11 | ||||
-rw-r--r-- | kernel/time/timer_stats.c | 10 |
2 files changed, 8 insertions, 13 deletions
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index fe9314a89f20..b734ca4bc75e 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
@@ -38,15 +38,12 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases); | |||
38 | 38 | ||
39 | static void print_name_offset(struct seq_file *m, void *sym) | 39 | static void print_name_offset(struct seq_file *m, void *sym) |
40 | { | 40 | { |
41 | unsigned long addr = (unsigned long)sym; | 41 | char symname[KSYM_NAME_LEN+1]; |
42 | char namebuf[KSYM_NAME_LEN+1]; | ||
43 | const char *sym_name; | ||
44 | 42 | ||
45 | sym_name = kallsyms_lookup(addr, NULL, NULL, NULL, namebuf); | 43 | if (lookup_symbol_name((unsigned long)sym, symname) < 0) |
46 | if (sym_name) | ||
47 | SEQ_printf(m, "%s", sym_name); | ||
48 | else | ||
49 | SEQ_printf(m, "<%p>", sym); | 44 | SEQ_printf(m, "<%p>", sym); |
45 | else | ||
46 | SEQ_printf(m, "%s", symname); | ||
50 | } | 47 | } |
51 | 48 | ||
52 | static void | 49 | static void |
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c index 946ed45f7d2f..868f1bceb07f 100644 --- a/kernel/time/timer_stats.c +++ b/kernel/time/timer_stats.c | |||
@@ -257,14 +257,12 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
257 | 257 | ||
258 | static void print_name_offset(struct seq_file *m, unsigned long addr) | 258 | static void print_name_offset(struct seq_file *m, unsigned long addr) |
259 | { | 259 | { |
260 | char namebuf[KSYM_NAME_LEN+1]; | 260 | char symname[KSYM_NAME_LEN+1]; |
261 | const char *sym_name; | ||
262 | 261 | ||
263 | sym_name = kallsyms_lookup(addr, NULL, NULL, NULL, namebuf); | 262 | if (lookup_symbol_name(addr, symname) < 0) |
264 | if (sym_name) | ||
265 | seq_printf(m, "%s", sym_name); | ||
266 | else | ||
267 | seq_printf(m, "<%p>", (void *)addr); | 263 | seq_printf(m, "<%p>", (void *)addr); |
264 | else | ||
265 | seq_printf(m, "%s", symname); | ||
268 | } | 266 | } |
269 | 267 | ||
270 | static int tstats_show(struct seq_file *m, void *v) | 268 | static int tstats_show(struct seq_file *m, void *v) |