Re: [PATCH] kprobes: Print an error if probe is rejected

From: Masami Hiramatsu
Date: Tue Jun 15 2021 - 01:42:35 EST


Hi Naveen,

On Mon, 14 Jun 2021 21:07:40 +0530
"Naveen N. Rao" <naveen.n.rao@xxxxxxxxxxxxxxxxxx> wrote:
> >
> >> We also have perf_event_open() as an interface to add probes, and I
> >> don't think it would be helpful to require all tools to utilize the
> >> error log from tracefs for this purpose.
> >
> > No, perf probe doesn't use perf-event interface to add probes. It uses
> > the tracefs for adding probes.
>
> Yes, but I was referring to some of the bpf tools (bcc) that now use
> perf_event_open() interface.

Yes, bpf chooses to use a special temporary perf_event, something like a
performance counter event. Those are hidden from tracefs and perf-tool.
The perf probe is the frontend of the trace event and perf event, which
will add dynamic events in tracefs, and perf will use it as same as
the other static events.

Thank you,




--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>