Lines Matching refs:entries
63 unsigned long entries[]; /* Variable-sized array of frames */ member
126 unsigned long entries = 0; in stack_depot_early_init() local
149 entries = 1UL << stack_bucket_number_order; in stack_depot_early_init()
153 entries, in stack_depot_early_init()
173 unsigned long entries; in stack_depot_init() local
186 entries = 1UL << stack_bucket_number_order; in stack_depot_init()
190 entries = nr_free_buffer_pages(); in stack_depot_init()
191 entries = roundup_pow_of_two(entries); in stack_depot_init()
194 entries >>= (scale - PAGE_SHIFT); in stack_depot_init()
196 entries <<= (PAGE_SHIFT - scale); in stack_depot_init()
199 if (entries < 1UL << STACK_BUCKET_NUMBER_ORDER_MIN) in stack_depot_init()
200 entries = 1UL << STACK_BUCKET_NUMBER_ORDER_MIN; in stack_depot_init()
201 if (entries > 1UL << STACK_BUCKET_NUMBER_ORDER_MAX) in stack_depot_init()
202 entries = 1UL << STACK_BUCKET_NUMBER_ORDER_MAX; in stack_depot_init()
204 pr_info("allocating hash table of %lu entries via kvcalloc\n", entries); in stack_depot_init()
205 stack_table = kvcalloc(entries, sizeof(struct stack_record *), GFP_KERNEL); in stack_depot_init()
212 stack_hash_mask = entries - 1; in stack_depot_init()
260 depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc) in depot_alloc_stack() argument
263 size_t required_size = struct_size(stack, entries, size); in depot_alloc_stack()
308 memcpy(stack->entries, entries, flex_array_size(stack, entries, size)); in depot_alloc_stack()
320 static inline u32 hash_stack(unsigned long *entries, unsigned int size) in hash_stack() argument
322 return jhash2((u32 *)entries, in hash_stack()
323 array_size(size, sizeof(*entries)) / sizeof(u32), in hash_stack()
344 unsigned long *entries, int size, in find_stack() argument
352 !stackdepot_memcmp(entries, found->entries, size)) in find_stack()
358 depot_stack_handle_t __stack_depot_save(unsigned long *entries, in __stack_depot_save() argument
377 nr_entries = filter_irq_stacks(entries, nr_entries); in __stack_depot_save()
382 hash = hash_stack(entries, nr_entries); in __stack_depot_save()
390 found = find_stack(smp_load_acquire(bucket), entries, nr_entries, hash); in __stack_depot_save()
417 found = find_stack(*bucket, entries, nr_entries, hash); in __stack_depot_save()
420 depot_alloc_stack(entries, nr_entries, hash, &prealloc); in __stack_depot_save()
452 depot_stack_handle_t stack_depot_save(unsigned long *entries, in stack_depot_save() argument
456 return __stack_depot_save(entries, nr_entries, alloc_flags, true); in stack_depot_save()
461 unsigned long **entries) in stack_depot_fetch() argument
473 *entries = NULL; in stack_depot_fetch()
478 kmsan_unpoison_memory(entries, sizeof(*entries)); in stack_depot_fetch()
493 *entries = stack->entries; in stack_depot_fetch()
500 unsigned long *entries; in stack_depot_print() local
503 nr_entries = stack_depot_fetch(stack, &entries); in stack_depot_print()
505 stack_trace_print(entries, nr_entries, 0); in stack_depot_print()
512 unsigned long *entries; in stack_depot_snprint() local
515 nr_entries = stack_depot_fetch(handle, &entries); in stack_depot_snprint()
516 return nr_entries ? stack_trace_snprint(buf, size, entries, nr_entries, in stack_depot_snprint()