[DTrace-devel] [PATCH] Free the DIFO for a probe once it is loaded

Kris Van Hees kris.van.hees at oracle.com
Fri Jul 25 18:55:45 UTC 2025


On Fri, Jul 25, 2025 at 07:39:51PM +0100, Nick Alcock wrote:
> On 25 Jul 2025, Kris Van Hees verbalised:
> 
> > When a lot of probes are being probed, keeping all DIFO around consumes
> > a lot of memory.  Once the BPF program is loaded, the DIFO can be freed.
> 
> DIFO? BPFO, surely :)
> 
> ... the attached patch only seems to free anything new on failure, not
> on after-loading.

Oops, yes, will fix and send out a new one.

> > +fail:
> > +	dt_difo_free(dtp, prp->difo);
> > +	prp->difo = NULL;
> > +	return -1;
> [...]
> > +fail:
> > +	dt_difo_free(dtp, prp->difo);
> > +	prp->difo = NULL;
> > +	return 0;	// FIXME in dt_bpf_make_progs() this is a fatal error; should we do the same here?



More information about the DTrace-devel mailing list