Re: [BUG] perf probe can't remove probes
From: Masami Hiramatsu
Date: Tue Dec 15 2020 - 19:17:47 EST
On Thu, 26 Nov 2020 14:26:03 -0300
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> Em Thu, Nov 26, 2020 at 09:21:25AM +0900, Masami Hiramatsu escreveu:
> > Hi Arnaldo,
> >
> > On Wed, 25 Nov 2020 14:27:55 -0300
> > Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> >
> > >
> > > Masami, have you stumbled on this already?
> > >
> > > [root@seventh ~]# perf probe security_locked_down%return 'ret=$retval'
> > > Added new event:
> > > probe:security_locked_down__return (on security_locked_down%return with ret=$retval)
> > >
> > > You can now use it in all perf tools, such as:
> > >
> > > perf record -e probe:security_locked_down__return -aR sleep 1
> > >
> > > [root@seventh ~]# perf probe security_locked_down what
> > > Added new event:
> > > probe:security_locked_down (on security_locked_down with what)
> > >
> > > You can now use it in all perf tools, such as:
> > >
> > > perf record -e probe:security_locked_down -aR sleep 1
> > >
> > > [root@seventh ~]#
> > >
> > >
> > > [root@seventh ~]# uname -r
> > > 5.10.0-rc3.bpfsign+
> > > [root@seventh ~]# perf probe -l
> > > probe:security_locked_down (on security_locked_down@git/bpf/security/security.c with what)
> > > probe:security_locked_down__return (on security_locked_down%return@git/bpf/security/security.c with ret)
> > > [root@seventh ~]# perf probe -D '*:*'
> > > Semantic error :There is non-digit char in line number.
> > >
> > > Usage: perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]
> > > or: perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]
> > > or: perf probe [<options>] --del '[GROUP:]EVENT' ...
> > > or: perf probe --list [GROUP:]EVENT ...
> > > or: perf probe [<options>] --line 'LINEDESC'
> > > or: perf probe [<options>] --vars 'PROBEPOINT'
> > > or: perf probe [<options>] --funcs
> > >
> > > -D, --definition <[EVENT=]FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT [[NAME=]ARG ...]>
> > > Show trace event definition of given traceevent for k/uprobe_events.
> >
> > As you can see, "-D" is showing definition. Not delete. (*)
> > Delete is "-d" or "--del".
>
> Yeah, I was in a hurry and looked at just the first line right after the
> command, didn't want to forget reporting it so sent the "bug" report,
> d0h, sorry about the noise, using -d or --del works.
>
> But having both -d and -D, in retrospect, wasn't such a good idea :-\
Sorry for confusing :(
Hmm, would we better to remove -D and keep only --definition?
But it is already there, I think we should keep this option
for backward compatibility.
Thank you,
--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>