diff options
| -rw-r--r-- | kernel/trace/ftrace.c | 17 | ||||
| -rw-r--r-- | kernel/trace/trace_functions.c | 4 |
2 files changed, 4 insertions, 17 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 217caeca71cd..80a97a51442d 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
| @@ -1403,18 +1403,13 @@ static int t_hash_show(struct seq_file *m, void *v) | |||
| 1403 | { | 1403 | { |
| 1404 | struct ftrace_func_probe *rec; | 1404 | struct ftrace_func_probe *rec; |
| 1405 | struct hlist_node *hnd = v; | 1405 | struct hlist_node *hnd = v; |
| 1406 | char str[KSYM_SYMBOL_LEN]; | ||
| 1407 | 1406 | ||
| 1408 | rec = hlist_entry(hnd, struct ftrace_func_probe, node); | 1407 | rec = hlist_entry(hnd, struct ftrace_func_probe, node); |
| 1409 | 1408 | ||
| 1410 | if (rec->ops->print) | 1409 | if (rec->ops->print) |
| 1411 | return rec->ops->print(m, rec->ip, rec->ops, rec->data); | 1410 | return rec->ops->print(m, rec->ip, rec->ops, rec->data); |
| 1412 | 1411 | ||
| 1413 | kallsyms_lookup(rec->ip, NULL, NULL, NULL, str); | 1412 | seq_printf(m, "%pf:%pf", (void *)rec->ip, (void *)rec->ops->func); |
| 1414 | seq_printf(m, "%s:", str); | ||
| 1415 | |||
| 1416 | kallsyms_lookup((unsigned long)rec->ops->func, NULL, NULL, NULL, str); | ||
| 1417 | seq_printf(m, "%s", str); | ||
| 1418 | 1413 | ||
| 1419 | if (rec->data) | 1414 | if (rec->data) |
| 1420 | seq_printf(m, ":%p", rec->data); | 1415 | seq_printf(m, ":%p", rec->data); |
| @@ -1512,7 +1507,6 @@ static int t_show(struct seq_file *m, void *v) | |||
| 1512 | { | 1507 | { |
| 1513 | struct ftrace_iterator *iter = m->private; | 1508 | struct ftrace_iterator *iter = m->private; |
| 1514 | struct dyn_ftrace *rec = v; | 1509 | struct dyn_ftrace *rec = v; |
| 1515 | char str[KSYM_SYMBOL_LEN]; | ||
| 1516 | 1510 | ||
| 1517 | if (iter->flags & FTRACE_ITER_HASH) | 1511 | if (iter->flags & FTRACE_ITER_HASH) |
| 1518 | return t_hash_show(m, v); | 1512 | return t_hash_show(m, v); |
| @@ -1525,9 +1519,7 @@ static int t_show(struct seq_file *m, void *v) | |||
| 1525 | if (!rec) | 1519 | if (!rec) |
| 1526 | return 0; | 1520 | return 0; |
| 1527 | 1521 | ||
| 1528 | kallsyms_lookup(rec->ip, NULL, NULL, NULL, str); | 1522 | seq_printf(m, "%pf\n", (void *)rec->ip); |
| 1529 | |||
| 1530 | seq_printf(m, "%s\n", str); | ||
| 1531 | 1523 | ||
| 1532 | return 0; | 1524 | return 0; |
| 1533 | } | 1525 | } |
| @@ -2508,7 +2500,6 @@ static void g_stop(struct seq_file *m, void *p) | |||
| 2508 | static int g_show(struct seq_file *m, void *v) | 2500 | static int g_show(struct seq_file *m, void *v) |
| 2509 | { | 2501 | { |
| 2510 | unsigned long *ptr = v; | 2502 | unsigned long *ptr = v; |
| 2511 | char str[KSYM_SYMBOL_LEN]; | ||
| 2512 | 2503 | ||
| 2513 | if (!ptr) | 2504 | if (!ptr) |
| 2514 | return 0; | 2505 | return 0; |
| @@ -2518,9 +2509,7 @@ static int g_show(struct seq_file *m, void *v) | |||
| 2518 | return 0; | 2509 | return 0; |
| 2519 | } | 2510 | } |
| 2520 | 2511 | ||
| 2521 | kallsyms_lookup(*ptr, NULL, NULL, NULL, str); | 2512 | seq_printf(m, "%pf\n", v); |
| 2522 | |||
| 2523 | seq_printf(m, "%s\n", str); | ||
| 2524 | 2513 | ||
| 2525 | return 0; | 2514 | return 0; |
| 2526 | } | 2515 | } |
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 7402144bff21..b53dc994dfb6 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
| @@ -288,11 +288,9 @@ static int | |||
| 288 | ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, | 288 | ftrace_trace_onoff_print(struct seq_file *m, unsigned long ip, |
| 289 | struct ftrace_probe_ops *ops, void *data) | 289 | struct ftrace_probe_ops *ops, void *data) |
| 290 | { | 290 | { |
| 291 | char str[KSYM_SYMBOL_LEN]; | ||
| 292 | long count = (long)data; | 291 | long count = (long)data; |
| 293 | 292 | ||
| 294 | kallsyms_lookup(ip, NULL, NULL, NULL, str); | 293 | seq_printf(m, "%pf:", (void *)ip); |
| 295 | seq_printf(m, "%s:", str); | ||
| 296 | 294 | ||
| 297 | if (ops == &traceon_probe_ops) | 295 | if (ops == &traceon_probe_ops) |
| 298 | seq_printf(m, "traceon"); | 296 | seq_printf(m, "traceon"); |
