Re: [PATCH] tracing: Add task_prctl_unknown tracepoint

From: Marco Elver
Date: Wed Nov 06 2024 - 04:23:26 EST


On Tue, 5 Nov 2024 at 18:22, Marco Elver <elver@xxxxxxxxxx> wrote:
...
> > > > I'm also surprised that the comm didn't show in the trace_pipe.
> > >
> > > Any config options or tweaks needed to get it to show more reliably?
> > >
> > > > I've
> > > > updated the code so that it should usually find it. But saving it here may
> > > > not be a big deal.
> >
> > How did you start it? Because it appears reliable for me.
>
> Very normally from bash. Maybe my env is broken in other ways, I'll
> dig a little.

Some trial and error led me to conclude it's a race between the logic
looking up the comm and the process exiting: If the test program exits
soon after the traced event, it doesn't print the comm. Adding a
generous usleep() before it exits reliably prints the comm.