diff --git a/lib/stackdepot.c b/lib/stackdepot.c index 53ad6c0..f1d84e1 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -104,6 +104,7 @@ static bool init_stack_slab(void **prealloc) return true; } +static int alloc_cnt = 0; /* imprecise */ /* Allocation of a new stack in raw storage */ static struct stack_record *depot_alloc_stack(unsigned long *entries, int size, u32 hash, void **prealloc, gfp_t alloc_flags) @@ -143,6 +144,11 @@ static struct stack_record *depot_alloc_stack(unsigned long *entries, int size, memcpy(stack->entries, entries, size * sizeof(unsigned long)); depot_offset += required_size; + alloc_cnt++; + if (alloc_cnt % 100 == 0) + pr_err("alloc_cnt: %d\n", alloc_cnt); + if ((alloc_cnt > 20000) && (alloc_cnt % 10 == 0)) + dump_stack(); return stack; }