Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 2016 21:47:19 +0100
From:      Domagoj Stolfa <domagoj.stolfa@gmail.com>
To:        Adrian Chadd <adrian.chadd@gmail.com>
Cc:        "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>
Subject:   RFC: DTrace probes for debugging or testing in userland programs
Message-ID:  <20161219204719.GE65993@freebsd-laptop>
In-Reply-To: <CAJ-Vmon3%2BjMyfgBcVORyMoXX3JEAFCWtK2VPo9wWLN2hsS%2BrNA@mail.gmail.com>
References:  <20161220.043646.1181938468712455328.hrs@allbsd.org> <CAJ-Vmon3%2BjMyfgBcVORyMoXX3JEAFCWtK2VPo9wWLN2hsS%2BrNA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--/Zw+/jwnNHcBRYYu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

> I'd love to see a unified-ish logging API for FreeBSD applications. I
> always end up reusing some C code I have here that I based on some
> Squid style logging API in ages past. I could always polish it up and
> put it up for review.
>
> I'm not a big fan of requiring dtrace to use it though. On a lot of
> the embedded systems dtrace varies from "it's very big" through to "we
> don't have enough RAM/flash to do this".

DTrace indeed is very heavyweight, this could be an opt-in kind of thing
compile time, hidden somewhere in the logging system employed.
Personally, I think that keeping the diffs in the actual daemons to the
bare minimum(1-2 LoC) should be one of the priorities. Additionally, the
logging system should by default be lightweight, with compile time
options to change the actual logging method(a simple log, DTrace, ...).

> So although I like the sentiment, I don't think using dtrace for
> program logging is the right answer.  I like what apple did to wrap
> the program logging stuff so people didn't just write their own
> libraries (hi!) and so there's a unified-ish way to interact with
> apple programs. I think we could do with that.

This sounds like a pretty clean solution, and the logging method could
be hid somewhere deep in there. I would personally like to see an option
where I could pick DTrace for logging, as it allows for some interesting
scripts to be written, however I tend to agree that this should not be
the default.

--=20
Best regards,
Domagoj Stolfa.

--/Zw+/jwnNHcBRYYu
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEHQB+y96lmmv+IXofwxT+ikb0YU4FAlhYR1cACgkQwxT+ikb0
YU79Ugf+OUJw1oqxjYJ4pO3NO4KIhe85NSfyheTv7J98Z149v4TMmoirWjIJbcS1
3too/UvBwD3EmROzngD1dLS2kD8k3r8gCmIDh2eIA4S8FC/CtHIYJ1V9AETbxAhq
vDWub7ndrTw0vjckoDDWLx8jQJmY17KmkZzUrM4RDizoTBQBZYcE2seBggM2mP7P
33vRsoguy2yABmbCTzg1q/LGQrYpGj5VrdbwyoeloxthQugqDb54yf2/fS2BfeS8
6xfZv11yh4/OhH7BIPMLSvWIT4Xw6rD6ng0XSJdjqmbkZsWNW3n22xTEgxjgd4sn
U1rlTuRL7vnDFOD0KUhmVmmghrgvDg==
=2mVa
-----END PGP SIGNATURE-----

--/Zw+/jwnNHcBRYYu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161219204719.GE65993>