Lines Matching full:entries

69 		unsigned long entries[CONFIG_STACKDEPOT_MAX_FRAMES];	/* Frames */  member
76 * union @entries and freelist management state below.
155 static void init_stack_table(unsigned long entries) in init_stack_table() argument
159 for (i = 0; i < entries; i++) in init_stack_table()
166 unsigned long entries = 0; in stack_depot_early_init() local
198 * If stack_bucket_number_order is not set, leave entries as 0 to rely in stack_depot_early_init()
202 entries = 1UL << stack_bucket_number_order; in stack_depot_early_init()
206 entries, in stack_depot_early_init()
218 if (!entries) { in stack_depot_early_init()
220 * Obtain the number of entries that was calculated by in stack_depot_early_init()
223 entries = stack_hash_mask + 1; in stack_depot_early_init()
225 init_stack_table(entries); in stack_depot_early_init()
234 unsigned long entries; in stack_depot_init() local
247 entries = 1UL << stack_bucket_number_order; in stack_depot_init()
251 entries = nr_free_buffer_pages(); in stack_depot_init()
252 entries = roundup_pow_of_two(entries); in stack_depot_init()
255 entries >>= (scale - PAGE_SHIFT); in stack_depot_init()
257 entries <<= (PAGE_SHIFT - scale); in stack_depot_init()
260 if (entries < 1UL << STACK_BUCKET_NUMBER_ORDER_MIN) in stack_depot_init()
261 entries = 1UL << STACK_BUCKET_NUMBER_ORDER_MIN; in stack_depot_init()
262 if (entries > 1UL << STACK_BUCKET_NUMBER_ORDER_MAX) in stack_depot_init()
263 entries = 1UL << STACK_BUCKET_NUMBER_ORDER_MAX; in stack_depot_init()
265 pr_info("allocating hash table of %lu entries via kvcalloc\n", entries); in stack_depot_init()
266 stack_table = kvcalloc(entries, sizeof(struct list_head), GFP_KERNEL); in stack_depot_init()
273 stack_hash_mask = entries - 1; in stack_depot_init()
274 init_stack_table(entries); in stack_depot_init()
413 const size_t used = flex_array_size(s, entries, nr_entries); in depot_stack_record_size()
414 const size_t unused = sizeof(s->entries) - used; in depot_stack_record_size()
416 WARN_ON_ONCE(sizeof(s->entries) < used); in depot_stack_record_size()
423 depot_alloc_stack(unsigned long *entries, unsigned int nr_entries, u32 hash, depot_flags_t flags, v… in depot_alloc_stack() argument
440 * Evictable entries have to allocate the max. size so they may in depot_alloc_stack()
459 memcpy(stack->entries, entries, flex_array_size(stack, entries, nr_entries)); in depot_alloc_stack()
538 * Add the entry to the freelist tail, so that older entries are in depot_free_stack()
553 static inline u32 hash_stack(unsigned long *entries, unsigned int size) in hash_stack() argument
555 return jhash2((u32 *)entries, in hash_stack()
556 array_size(size, sizeof(*entries)) / sizeof(u32), in hash_stack()
577 unsigned long *entries, int size, in find_stack() argument
588 * unused entries, because the stack record free-then-reuse code paths in find_stack()
599 * management state unioned with @entries. The refcount is zero in find_stack()
602 if (data_race(stackdepot_memcmp(entries, stack->entries, size))) in find_stack()
625 depot_stack_handle_t stack_depot_save_flags(unsigned long *entries, in stack_depot_save_flags() argument
650 nr_entries = filter_irq_stacks(entries, nr_entries); in stack_depot_save_flags()
655 hash = hash_stack(entries, nr_entries); in stack_depot_save_flags()
659 found = find_stack(bucket, entries, nr_entries, hash, depot_flags); in stack_depot_save_flags()
685 found = find_stack(bucket, entries, nr_entries, hash, depot_flags); in stack_depot_save_flags()
688 depot_alloc_stack(entries, nr_entries, hash, depot_flags, &prealloc); in stack_depot_save_flags()
722 depot_stack_handle_t stack_depot_save(unsigned long *entries, in stack_depot_save() argument
726 return stack_depot_save_flags(entries, nr_entries, alloc_flags, in stack_depot_save()
732 unsigned long **entries) in stack_depot_fetch() argument
736 *entries = NULL; in stack_depot_fetch()
738 * Let KMSAN know *entries is initialized. This shall prevent false in stack_depot_fetch()
741 kmsan_unpoison_memory(entries, sizeof(*entries)); in stack_depot_fetch()
754 *entries = stack->entries; in stack_depot_fetch()
781 unsigned long *entries; in stack_depot_print() local
784 nr_entries = stack_depot_fetch(stack, &entries); in stack_depot_print()
786 stack_trace_print(entries, nr_entries, 0); in stack_depot_print()
793 unsigned long *entries; in stack_depot_snprint() local
796 nr_entries = stack_depot_fetch(handle, &entries); in stack_depot_snprint()
797 return nr_entries ? stack_trace_snprint(buf, size, entries, nr_entries, in stack_depot_snprint()