From: Martin Pieuchot Subject: Re: dt: Trace tracing program To: Christian Ludwig Cc: tech@openbsd.org Date: Mon, 5 Feb 2024 16:14:32 +0100 On 02/02/24(Fri) 16:24, Christian Ludwig wrote: > For the sake of visibility, also trace the tracing program itself. > If you really wanted to hide it, add a filter to your probes, like: I'm not sure about that. Why do you want to see the tracing program? What are you trying to monitor? > > | BEGIN { > | @tracer = pid; > | } > | > | profile:hz:100 / pid != @tracer / > | { > | @[kstack] = count(); > | } > --- > sys/dev/dt/dt_dev.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/sys/dev/dt/dt_dev.c b/sys/dev/dt/dt_dev.c > index 12c5390cdbb..71e90a71d2b 100644 > --- a/sys/dev/dt/dt_dev.c > +++ b/sys/dev/dt/dt_dev.c > @@ -702,10 +702,6 @@ dt_pcb_filter(struct dt_pcb *dp) > unsigned int var = 0; > int match = 1; > > - /* Filter out tracing program. */ > - if (dp->dp_sc->ds_pid == p->p_p->ps_pid) > - return 1; > - > switch (dtf->dtf_variable) { > case DT_FV_PID: > var = p->p_p->ps_pid; > -- > 2.34.1 >