Re: [PATCH v2] tracing: Fix event probe removal from dynamic events

From: Masami Hiramatsu
Date: Tue Oct 12 2021 - 18:42:32 EST


On Tue, 12 Oct 2021 12:03:10 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Tue, 12 Oct 2021 23:31:07 +0900
> Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:
>
> > Hmm, this seems something wrong. Via dynamic_events interface, all the
> > events must be parsed equaly. If you have to pass the attached "system/event"
> > that's something wrong. The dynamic_events interface will accept
> >
> > -:[GROUP/]EVENT [optional arguments]
> >
> > Or
> >
> > !e:[GROUP/]EVENT [optional arguments]
> >
> > What did you expect other that these syntax?
>
> But there are non "optional arguments".
>
> To create the event probe, we need to send:
>
> e:[GROUP/]EVENT system/event [optional arguments]
>
> Where the "system/event" is what we attach to. Similar to adding a function
> or address to kprobes. Do you not need to add that for deleting a kprobe?

No, since if the GROUP name is given, we can identify the event.

And sorry. I misunderstood your patch, simply I mixed the group/event is
the name of group/event or the attached group/event.

Actually, the dynamic_events delete command is something like wildcard
unless you specify the options.

>
> That is, if I create a kprobe with:
>
> p:myprobe schedule > dynamic_events
>
> To remove it, don't we need to have:
>
> -:myprobe schedule >> dynamic_events

Yes, it is possible. But you can also do

-:kprobes/myprobe >> dynamic_events

So, the "schedule" trace point is optional.

Anyway, let me comment on your patch again.

Thank you,


--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>