Re: [PATCH 3/3] mm: mmap_lock: add ip to mmap_lock tracepoints

From: Vlastimil Babka
Date: Fri Jul 30 2021 - 04:12:43 EST


On 7/29/21 7:33 PM, Axel Rasmussen wrote:
> Not a strong objection, but I think this can be achieved already using either:
>
> - The "stacktrace" feature which histogram triggers support
> (https://www.kernel.org/doc/html/latest/trace/histogram.html)
> - bpftrace's kstack/ustack feature
> (https://github.com/iovisor/bpftrace/blob/master/docs/tutorial_one_liners.md#lesson-9-profile-on-cpu-kernel-stacks)
>
> I haven't tried it out myself, but I suspect you could construct a
> synthetic event
> (https://www.kernel.org/doc/html/latest/trace/histogram.html#synthetic-events)
> which adds in the stack trace, then it ought to function a lot like it
> would with this patch.
>
> Then again, it's not like this change is huge by any means. So, if you
> find this more convenient than those alternatives, you can take:
>
> Reviewed-by: Axel Rasmussen <axelrasmussen@xxxxxxxxxx>
>
> It's possible Steven or Tom have a more strong opinion on this though. ;)

I generally dislike tracepoints with an ip. Often you then find out it's not
enough to distinguish what you need (due to some commonly shared wrapper doing
the call) and you need more of the backtrace anyway.