On Fri, 19 Jul 2024 15:04:40 -0700 Shakeel Butt <shakeel.butt@xxxxxxxxx> wrote: > > > Any specific reason to add this function in header? > > > > For performance reasons to keep it inlined into stack_not_used() which > > is also defined as inline function in this header. > > > > Is this really that performance critical? Nope. stack_not_used() is for CONFIG_DEBUG_STACK_USAGE and stack_not_used() is slow. I suggest that stack_not_used() (and hence kstack_histogram()) be uninlined. This can be a followup patch.