[DTrace-devel] [PATCH] add BEGIN and END probes

Eugene Loh eugene.loh at oracle.com
Sat Mar 21 13:38:24 PDT 2020


On 03/19/2020 03:38 PM, Kris Van Hees wrote:

> Some extra info sparked by this patch...
>
>> -	/* this has problems if a probe has more than one clause */
>> +	/* FIXME: this has problems if a probe has more than one clause */
>>   	if (ioctl(prp->event_fd, PERF_EVENT_IOC_SET_BPF, bpf_fd) < 0)
>>   		return -errno;
> Tracing perf events allow for up to 32 BPF programs to be attached to them.
> This is a limit in the kernel that we may have to petition to be raised if we
> find this to be a problem.
>
> So, while the ioctl name PERF_EVENT_IOC_SET_BPF seem to imply that there can
> only be one BPF attached at a time, that limitation only applies to non-tracing
> perf events.  For tracing perf events it acts like a 'add BPF' operation :)

This issue is orthogonal to the patch, but I'll try to describe it.

First, I get what you're saying.

Meanwhile, if I try something like "write:entry {trace(1)} write:entry 
{trace(2)}" I fail on this call.  That's the problem I was trying to 
describe.  The FIXME comment was simply intended as a reminder of this 
problem.



More information about the DTrace-devel mailing list