Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Dec 2016 08:08:05 +0900
From:      Hiroki Sato <hrs@allbsd.org>
To:        Domagoj Stolfa <domagoj.stolfa@gmail.com>
Cc:        freebsd-arch@FreeBSD.org, adrian.chadd@gmail.com
Subject:   Re: RFC: DTrace probes for debugging or testing in userland programs
Message-ID:  <9887B4D9-A336-498D-ADDE-E683B0DEC2E8@allbsd.org>
In-Reply-To: <20161219215425.GB42198@freebsd-laptop>
References:  <20161220.043646.1181938468712455328.hrs@allbsd.org> <CAJ-Vmon3%2BjMyfgBcVORyMoXX3JEAFCWtK2VPo9wWLN2hsS%2BrNA@mail.gmail.com> <20161219204719.GE65993@freebsd-laptop> <20161220.060542.16356944875657261.hrs@allbsd.org> <20161219215425.GB42198@freebsd-laptop>

next in thread | previous in thread | raw e-mail | index | archive | help
2016/12/20 6:54=1B$B!"=1B(BDomagoj Stolfa <domagoj.stolfa@gmail.com> =1B$B$N=
%a%C%;!<%8=1B(B:

> Hello,
>=20
>> To be clear: my proposal is to replace only debug logging (i.e. for
>> developers), not the other logging in general, as the subject line
>> says.  Although I agree that DTrace is not lightweight, I think
>> impact of just adding tracing probes is small.
>>=20
>> -- Hiroki
>=20
> I believe this would indeed be beneficial for debugging. My main concern
> is the way that we would have to attach to probes should we use SDT
> provider as it works now. If we were to create probes for each of the
> daemons, which we would then run individually, and if I'm not mistaken,
> that would spawn 2 times the amount of processes than are currently=20
> spawned due to each ``dtrace'' call from the command line spawns a process=
.

No.  A single dtrace process can catch
fired probes of multiple processes if you want.

Filtering probes or the results from probes
is things which should be done in the
D script level, not in the target binary,
in the case of DTrace.  My proposal does
not cover how to use the probes.  It just
provides probes and a sample script to
reproduce the (almost) same results with
printf() debug logging.  The big difference
is that a developer can use these probes
for a more complex debug script and/or
regression test script because the
probes can carry data structures in
question, not just a string.

-- Hiroki=




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9887B4D9-A336-498D-ADDE-E683B0DEC2E8>