• Home
  • Raw
  • Download

Lines Matching full:stack

3  * Generic stack depot for storing stack traces.
5 * Some debugging tools need to save stack traces of certain events which can
7 * free stacks for each object, but storing two stack traces per object
11 * Instead, stack depot maintains a hashtable of unique stacktraces. Since alloc
38 #define STACK_ALLOC_ORDER 2 /* 'Slab' size order for stack depot, 4 pages */
63 u32 size; /* Number of frames in the stack */
103 /* Allocation of a new stack in raw storage */
109 struct stack_record *stack; in depot_alloc_stack() local
115 WARN_ONCE(1, "Stack depot reached limit capacity"); in depot_alloc_stack()
132 stack = stack_slabs[depot_index] + depot_offset; in depot_alloc_stack()
134 stack->hash = hash; in depot_alloc_stack()
135 stack->size = size; in depot_alloc_stack()
136 stack->handle.slabindex = depot_index; in depot_alloc_stack()
137 stack->handle.offset = depot_offset >> STACK_ALLOC_ALIGN; in depot_alloc_stack()
138 stack->handle.valid = 1; in depot_alloc_stack()
139 memcpy(stack->entries, entries, size * sizeof(unsigned long)); in depot_alloc_stack()
142 return stack; in depot_alloc_stack()
154 /* Calculate hash for a stack */
177 /* Find a stack that is equal to the one stored in entries in the hash */
194 * stack_depot_fetch - Fetch stack entries from a depot
196 * @handle: Stack depot handle which was returned from
208 struct stack_record *stack; in stack_depot_fetch() local
212 WARN(1, "slab index %d out of bounds (%d) for stack id %08x\n", in stack_depot_fetch()
219 stack = slab + offset; in stack_depot_fetch()
221 *entries = stack->entries; in stack_depot_fetch()
222 return stack->size; in stack_depot_fetch()
227 * stack_depot_save - Save a stack trace from an array
233 * Return: The handle of the stack struct stored in depot
253 * Fast path: look the stack trace up without locking. in stack_depot_save()
263 * Check if the current or the next stack slab need to be initialized. in stack_depot_save()
302 * We didn't need to store this stack trace, but let's keep in stack_depot_save()
336 /* Include the irqentry function into the stack. */ in filter_irq_stacks()