15 #include <linux/export.h>
18 #include <asm/stacktrace.h>
25 printk(
"%s(0x%08lx to 0x%08lx)\n", str, bottom, top);
27 for (p = bottom & ~31; p <
top; ) {
28 printk(
"%04lx: ", p & 0xffff);
30 for (i = 0; i < 8; i++, p += 4) {
33 if (p < bottom || p >= top)
49 printk(
" [<%p>] %s%pS\n", (
void *) address,
50 reliable ?
"" :
"? ", (
void *) address);
53 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
55 print_ftrace_graph_addr(
unsigned long addr,
void *
data,
60 unsigned long ret_addr;
61 int index = task->curr_ret_stack;
66 if (!task->ret_stack || index < *graph)
70 ret_addr = task->ret_stack[
index].ret;
72 ops->
address(data, ret_addr, 1);
78 print_ftrace_graph_addr(
unsigned long addr,
void *data,
95 while (!kstack_end(sp)) {
96 unsigned long addr = *sp++;
101 print_ftrace_graph_addr(addr, data, ops,
107 static int print_trace_stack(
void *data,
char *
name)
109 printk(
"%s <%s> ", (
char *)data, name);
116 static void print_trace_address(
void *data,
unsigned long addr,
int reliable)
123 .stack = print_trace_stack,
124 .address = print_trace_address,
133 printk(
"\nCall trace:\n");
152 sp = (
unsigned long *)current_stack_pointer;
154 sp = (
unsigned long *)tsk->
thread.sp;
156 stack = (
unsigned long)
sp;