Re: [PATCH v3 00/27] function_graph: Allow multiple users for function graph tracing

From: Mark Rutland
Date: Tue Jun 04 2024 - 13:04:48 EST


On Tue, Jun 04, 2024 at 12:31:24PM -0400, Steven Rostedt wrote:
> On Tue, 4 Jun 2024 15:44:40 +0100
> Mark Rutland <mark.rutland@xxxxxxx> wrote:
>
> > Hi Steve, Masami,
> >
> > On Tue, Jun 04, 2024 at 08:18:50AM -0400, Steven Rostedt wrote:
> > >
> > > Masami,
> > >
> > > This series passed all my tests, are you comfortable with me pushing
> > > them to linux-next?
> >
> > As a heads-up (and not to block pushing this into next), I just gave
> > this a spin on arm64 atop v6.10-rc2, and running the selftests I see:
> >
> > ftrace - function pid filters
> > (instance) ftrace - function pid filters
> >
> > ... both go from [PASS] to [FAIL].
> >
> > Everything else looks good -- I'll go dig into why that's happening.
> >
> > It's possible that's just something odd with the filesystem I'm using
> > (e.g. the wnership test failed because this lacks 'stat').
>
> Thanks for the update. I could be something I missed in patch 13 that had
> to put back the pid code.
>
> There may have been something arch specific that I'm unaware about. I'll
> look at that deeper.

It looks like e are lines in the trace that it doesn't expect:

+ cat trace
+ grep -v ^#
+ grep 970
+ wc -l
+ count_pid=0
+ cat trace
+ grep -v ^#
+ grep -v 970
+ wc -l
+ count_other=3
+ [ 0 -eq 0 -o 3 -ne 0 ]
+ fail PID filtering not working?

... where we expect that count_other to be 0.

I hacked in a 'cat trace' just before the 'fail' and that shows:

+ cat trace
# tracer: function_graph
#
# CPU DURATION FUNCTION CALLS
# | | | | | | |
3) ! 143.685 us | kernel_clone();
3) ! 127.055 us | kernel_clone();
1) ! 127.170 us | kernel_clone();
3) ! 126.840 us | kernel_clone();

I'm not sure if that's legitimate output the test is failing to account
for or if that indicates a kernel-side issue.

Mark.