Lines Matching full:stack

58  * The stack tracer looks for a maximum stack at each call from a function. It
59 * registers a callback from ftrace, and in that callback it examines the stack
60 * size. It determines the stack size from the variable passed in, which is the
62 * The stack size is calculated by the address of the local variable to the top
63 * of the current stack. If that size is smaller than the currently saved max
64 * stack size, nothing more is done.
66 * If the size of the stack is greater than the maximum recorded size, then the
70 * saving the function's local variables, the stack will look something like
73 * [ top of stack ]
80 * 31: [ do trace stack here ]
83 * current stack. Which would be (from the bottom of the stack to the top):
90 * a search of the stack is made to find these values. When a match is made, it
91 * is added to the stack_dump_trace[] array. The offset into the stack is saved
101 * each function's portion of the stack.
119 * this will cause the stack to look a little different:
121 * [ top of stack ]
127 * 30: [ do trace stack here ]
130 * placement in the stack will be different. Using the same algorithm as above
141 * kernel_func_bar stack frame size is 29 - 19 not 30 - 29!
145 * stack trace entries is decremented by one.
153 * will still include the stack size of it.
155 static void check_stack(unsigned long ip, unsigned long *stack) in check_stack() argument
162 this_size = ((unsigned long)stack) & (THREAD_SIZE-1); in check_stack()
171 if (!object_is_on_stack(stack)) in check_stack()
195 /* Skip over the overhead of the stack tracer itself */ in check_stack()
209 * Now find where in the stack these are. in check_stack()
212 start = stack; in check_stack()
218 * for some reason be missed on the stack, so we may in check_stack()
232 * this is not a stack-out-of-bounds error. in check_stack()
243 * of the stack tracer stack in the in check_stack()
244 * max stack. If we haven't figured in check_stack()
249 tracer_frame = (p - stack) * in check_stack()
295 unsigned long stack; in stack_trace_call() local
304 /* If rcu is not watching, then save stack trace can fail */ in stack_trace_call()
310 check_stack(ip, &stack); in stack_trace_call()
427 "# Stack tracer disabled\n" in print_disabled()
429 "# To enable the stack tracer, either add 'stacktrace' to the\n" in print_disabled()