12 #include <linux/sched.h>
15 #include <linux/module.h>
17 #include <asm/ptrace.h>
18 #include <asm/stacktrace.h>
20 static int save_stack_stack(
void *
data,
char *
name)
28 static void save_stack_address(
void *
data,
unsigned long addr,
int reliable)
35 if (trace->skip > 0) {
40 if (trace->nr_entries < trace->max_entries)
41 trace->entries[trace->nr_entries++] =
addr;
45 .stack = save_stack_stack,
46 .address = save_stack_address,
51 unsigned long *
sp = (
unsigned long *)current_stack_pointer;
54 if (trace->nr_entries < trace->max_entries)
55 trace->entries[trace->nr_entries++] =
ULONG_MAX;
60 save_stack_address_nosched(
void *data,
unsigned long addr,
int reliable)
62 struct stack_trace *trace = (
struct stack_trace *)data;
70 if (trace->skip > 0) {
75 if (trace->nr_entries < trace->max_entries)
76 trace->entries[trace->nr_entries++] =
addr;
80 .stack = save_stack_stack,
81 .address = save_stack_address_nosched,
86 unsigned long *
sp = (
unsigned long *)tsk->
thread.sp;
89 if (trace->nr_entries < trace->max_entries)
90 trace->entries[trace->nr_entries++] =
ULONG_MAX;