Lines Matching refs:stack

3  * Stack depot - a stack trace storage that avoids duplication.
5 * Internally, stack depot maintains a hash table of unique stacktraces. The
6 * stack traces themselves are stored contiguously one after another in a set
47 /* Compact structure that stores a reference to a stack. */
78 /* Hash table of pointers to stored stack traces. */
85 /* Array of memory regions that store stack traces. */
136 * stack traces being stored in stack depot.
221 /* Uses preallocated memory to initialize a new stack depot pool. */
258 /* Allocates a new stack in a stack depot pool. */
262 struct stack_record *stack;
263 size_t required_size = struct_size(stack, entries, size);
296 /* Check if we have a pool to save the stack trace. */
300 /* Save the stack trace. */
301 stack = stack_pools[pool_index] + pool_offset;
302 stack->hash = hash;
303 stack->size = size;
304 stack->handle.pool_index = pool_index;
305 stack->handle.offset = pool_offset >> DEPOT_STACK_ALIGN;
306 stack->handle.valid = 1;
307 stack->handle.extra = 0;
308 memcpy(stack->entries, entries, flex_array_size(stack, entries, size));
311 * Let KMSAN know the stored stack record is initialized. This shall
314 kmsan_unpoison_memory(stack, required_size);
316 return stack;
319 /* Calculates the hash for a stack. */
342 /* Finds a stack in a bucket of the hash table. */
370 * If this stack trace is from an interrupt, including anything before
371 * interrupt entry usually leads to unbounded stack depot growth.
373 * Since use of filter_irq_stacks() is a requirement to ensure stack
375 * filter_irq_stacks() to simplify all callers' use of stack depot.
386 * Fast path: look the stack trace up without locking.
395 * Check if another stack pool needs to be initialized. If so, allocate
433 * Stack depot already contains this stack trace, but let's
471 struct stack_record *stack;
484 WARN(1, "pool index %d out of bounds (%d) for stack id %08x\n",
491 stack = pool + offset;
493 *entries = stack->entries;
494 return stack->size;
498 void stack_depot_print(depot_stack_handle_t stack)
503 nr_entries = stack_depot_fetch(stack, &entries);