Lines Matching full:entries

69 	unsigned long entries[];	/* Variable-sized array of entries. */  member
120 depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc) in depot_alloc_stack() argument
123 size_t required_size = struct_size(stack, entries, size); in depot_alloc_stack()
154 memcpy(stack->entries, entries, flex_array_size(stack, entries, size)); in depot_alloc_stack()
196 unsigned long entries = 0; in stack_depot_early_init() local
211 entries = 1UL << stack_hash_order; in stack_depot_early_init()
214 entries, in stack_depot_early_init()
238 unsigned long entries; in stack_depot_init() local
242 entries = 1UL << stack_hash_order; in stack_depot_init()
244 entries = nr_free_buffer_pages(); in stack_depot_init()
245 entries = roundup_pow_of_two(entries); in stack_depot_init()
248 entries >>= (scale - PAGE_SHIFT); in stack_depot_init()
250 entries <<= (PAGE_SHIFT - scale); in stack_depot_init()
253 if (entries < 1UL << STACK_HASH_ORDER_MIN) in stack_depot_init()
254 entries = 1UL << STACK_HASH_ORDER_MIN; in stack_depot_init()
255 if (entries > 1UL << STACK_HASH_ORDER_MAX) in stack_depot_init()
256 entries = 1UL << STACK_HASH_ORDER_MAX; in stack_depot_init()
258 pr_info("Stack Depot allocating hash table of %lu entries with kvcalloc\n", in stack_depot_init()
259 entries); in stack_depot_init()
260 stack_table = kvcalloc(entries, sizeof(struct stack_record *), GFP_KERNEL); in stack_depot_init()
266 stack_hash_mask = entries - 1; in stack_depot_init()
274 static inline u32 hash_stack(unsigned long *entries, unsigned int size) in hash_stack() argument
276 return jhash2((u32 *)entries, in hash_stack()
277 array_size(size, sizeof(*entries)) / sizeof(u32), in hash_stack()
296 /* Find a stack that is equal to the one stored in entries in the hash */
298 unsigned long *entries, int size, in find_stack() argument
306 !stackdepot_memcmp(entries, found->entries, size)) in find_stack()
313 * stack_depot_snprint - print stack entries from a depot into a buffer
328 unsigned long *entries; in stack_depot_snprint() local
331 nr_entries = stack_depot_fetch(handle, &entries); in stack_depot_snprint()
332 return nr_entries ? stack_trace_snprint(buf, size, entries, nr_entries, in stack_depot_snprint()
338 * stack_depot_print - print stack entries from a depot
346 unsigned long *entries; in stack_depot_print() local
349 nr_entries = stack_depot_fetch(stack, &entries); in stack_depot_print()
351 stack_trace_print(entries, nr_entries, 0); in stack_depot_print()
356 * stack_depot_fetch - Fetch stack entries from a depot
360 * @entries: Pointer to store the entries address
362 * Return: The number of trace entries for this depot.
365 unsigned long **entries) in stack_depot_fetch() argument
372 *entries = NULL; in stack_depot_fetch()
386 *entries = stack->entries; in stack_depot_fetch()
394 * @entries: Pointer to storage array
400 * Saves a stack trace from @entries array of size @nr_entries. If @can_alloc is
405 * If the stack trace in @entries is from an interrupt, only the portion up to
419 depot_stack_handle_t __stack_depot_save(unsigned long *entries, in __stack_depot_save() argument
439 nr_entries = filter_irq_stacks(entries, nr_entries); in __stack_depot_save()
444 hash = hash_stack(entries, nr_entries); in __stack_depot_save()
452 found = find_stack(smp_load_acquire(bucket), entries, in __stack_depot_save()
481 found = find_stack(*bucket, entries, nr_entries, hash); in __stack_depot_save()
483 struct stack_record *new = depot_alloc_stack(entries, nr_entries, hash, &prealloc); in __stack_depot_save()
520 * @entries: Pointer to storage array
529 depot_stack_handle_t stack_depot_save(unsigned long *entries, in stack_depot_save() argument
533 return __stack_depot_save(entries, nr_entries, 0, alloc_flags, true); in stack_depot_save()