Re: [PATCH v4 2/4] ftrace: Add support for function argument to graph tracer
From: Steven Rostedt
Date: Fri Apr 11 2025 - 13:16:00 EST
On Fri, 11 Apr 2025 17:58:32 +0100
Mark Brown <broonie@xxxxxxxxxx> wrote:
> On Fri, Apr 11, 2025 at 12:45:52PM -0400, Steven Rostedt wrote:
> > Mark Brown <broonie@xxxxxxxxxx> wrote:
> > > On Thu, Apr 10, 2025 at 01:17:45PM -0400, Steven Rostedt wrote:
>
> > > > Hmm, I wonder if there's junk being added into the trace.
>
> > > > Can you add this patch, and show me the output when it fails again?
>
> > Can you show the information before this output, to see what it is actually
> > testing?
>
> Here's a bit more of the context - this is literally just the ftrace
> selftests so it'll be doing whatever that does, there's a huge amount of
> log splat generated when enumerating all the triggers. I do note that
> it appears to assume there's a ping binary which might confusing things,
> though I'm surprised that'd be a regression rather than something that
> just never worked:
Thanks, even though I figured it out...
> # # + yield
> # # + ping 127.0.0.1 -c 1
> # # ./ftracetest: 179: /opt/kselftest/ftrace/test.d/ftrace/func-filter-pid.tc: ping: not found
The ping was just a way to add some extra noise, as sometimes, the system
just went totally idle, and nothing else showed up.
> # # + sleep .001
> # # + cat trace
> # # + grep -v ^#
> # # + grep 5190
> # # + wc -l
> # # + count_pid=2
> # # + cat trace
> # # + grep -v ^#
> # # + grep -v 5190
> # # + wc -l
> # # + count_other=3
This is what I was looking for. The "count_other" is the number of lines of
output that wasn't due to a '#' or something with '5190'.
> # # + [ 2 -eq 0 -o 3 -ne 0 ]
And it was expecting zero.
> # # + cat trace
> # # # tracer: function_graph
> # # #
> # # # CPU TASK/PID DURATION FUNCTION CALLS
> # # # | | | | | | | | |
> # # 0) ftracet-5190 | ! 537.633 us | kernel_clone(); /* ret=0x1470 */
> # #
> # # 0) ftracet-5190 | ! 508.253 us | kernel_clone(); /* ret=0x1471 */
> # #
> # # 0) ftracet-5190 | ! 215.716 us | kernel_clone(); /* ret=0x1476 */
> # #
> # # 0) ftracet-5190 | ! 493.890 us | kernel_clone(); /* ret=0x147b */
But it found 3 blank lines!
> That'll take a bit more arranging, I'm running these tests as batch jobs
> in CI infrastructure. I'll try to have a look. The only other test
> that actually failed was:
>
> # not ok 25 Checking dynamic events limitations
>
> which isn't flagged as a regression (there's some other UNRESOLVED ones).
Hmm, don't know about that one.
-- Steve