Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tracing: switch function prints from %pf to %ps

For direct function pointers (like what mcount provides) PowerPC64
requires the use of %ps, otherwise nothing is printed.

This patch converts all prints of functions retrieved through mcount
to use the %ps format from the %pf.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

authored by

Steven Rostedt and committed by
Steven Rostedt
b375a11a 91adcd2c

+7 -7
+3 -3
kernel/trace/ftrace.c
··· 1405 1405 if (rec->ops->print) 1406 1406 return rec->ops->print(m, rec->ip, rec->ops, rec->data); 1407 1407 1408 - seq_printf(m, "%pf:%pf", (void *)rec->ip, (void *)rec->ops->func); 1408 + seq_printf(m, "%ps:%ps", (void *)rec->ip, (void *)rec->ops->func); 1409 1409 1410 1410 if (rec->data) 1411 1411 seq_printf(m, ":%p", rec->data); ··· 1515 1515 if (!rec) 1516 1516 return 0; 1517 1517 1518 - seq_printf(m, "%pf\n", (void *)rec->ip); 1518 + seq_printf(m, "%ps\n", (void *)rec->ip); 1519 1519 1520 1520 return 0; 1521 1521 } ··· 2456 2456 return 0; 2457 2457 } 2458 2458 2459 - seq_printf(m, "%pf\n", (void *)*ptr); 2459 + seq_printf(m, "%ps\n", (void *)*ptr); 2460 2460 2461 2461 return 0; 2462 2462 }
+1 -1
kernel/trace/trace_functions.c
··· 290 290 { 291 291 long count = (long)data; 292 292 293 - seq_printf(m, "%pf:", (void *)ip); 293 + seq_printf(m, "%ps:", (void *)ip); 294 294 295 295 if (ops == &traceon_probe_ops) 296 296 seq_printf(m, "traceon");
+3 -3
kernel/trace/trace_functions_graph.c
··· 124 124 if (unlikely(current->ret_stack[index].fp != frame_pointer)) { 125 125 ftrace_graph_stop(); 126 126 WARN(1, "Bad frame pointer: expected %lx, received %lx\n" 127 - " from func %pF return to %lx\n", 127 + " from func %ps return to %lx\n", 128 128 current->ret_stack[index].fp, 129 129 frame_pointer, 130 130 (void *)current->ret_stack[index].func, ··· 669 669 return TRACE_TYPE_PARTIAL_LINE; 670 670 } 671 671 672 - ret = trace_seq_printf(s, "%pf();\n", (void *)call->func); 672 + ret = trace_seq_printf(s, "%ps();\n", (void *)call->func); 673 673 if (!ret) 674 674 return TRACE_TYPE_PARTIAL_LINE; 675 675 ··· 712 712 return TRACE_TYPE_PARTIAL_LINE; 713 713 } 714 714 715 - ret = trace_seq_printf(s, "%pf() {\n", (void *)call->func); 715 + ret = trace_seq_printf(s, "%ps() {\n", (void *)call->func); 716 716 if (!ret) 717 717 return TRACE_TYPE_PARTIAL_LINE; 718 718