From owner-freebsd-arch@freebsd.org Tue Dec 20 00:04:26 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDF8BC885F0; Tue, 20 Dec 2016 00:04:26 +0000 (UTC) (envelope-from SRS0+xyJv=YD=mail.turbofuzz.com=jkh@ixsystems.com) Received: from mx.ixsystems.com (mx.ixsystems.com [12.229.62.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN ".", Issuer "." (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CFB691CCE; Tue, 20 Dec 2016 00:04:26 +0000 (UTC) (envelope-from SRS0+xyJv=YD=mail.turbofuzz.com=jkh@ixsystems.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by mx.ixsystems.com (Postfix) with ESMTP id 3tjJ1Q4QJSzCqPb; Mon, 19 Dec 2016 16:04:26 -0800 (PST) X-Virus-Scanned: Scrollout F1 at ixsystems.com Received: from mx.ixsystems.com ([127.0.0.1]) by localhost (mx.ixsystems.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wpm3bPjxWHTW; Mon, 19 Dec 2016 16:04:15 -0800 (PST) Received: from zimbra.ixsystems.com (mail.ixsystems.com [10.246.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.ixsystems.com (Postfix) with ESMTPS id 3tjJ1C14X1zCrgh; Mon, 19 Dec 2016 16:04:15 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.ixsystems.com (Postfix) with ESMTP id 0A0859F115E; Mon, 19 Dec 2016 16:04:15 -0800 (PST) Received: from zimbra.ixsystems.com ([127.0.0.1]) by localhost (zimbra.ixsystems.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id lElWI0lZsH8h; Mon, 19 Dec 2016 16:04:12 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.ixsystems.com (Postfix) with ESMTP id 8F5BD9F115D; Mon, 19 Dec 2016 16:04:12 -0800 (PST) X-Virus-Scanned: amavisd-new at ixsystems.com Received: from zimbra.ixsystems.com ([127.0.0.1]) by localhost (zimbra.ixsystems.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id cFI05c1gSq1V; Mon, 19 Dec 2016 16:04:12 -0800 (PST) Received: from eyeball.ixsystems.com (eyeball.ixsystems.com [10.250.0.175]) by zimbra.ixsystems.com (Postfix) with ESMTPSA id 332CE9F115E; Mon, 19 Dec 2016 16:04:12 -0800 (PST) From: Jordan Hubbard Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: RFC: DTrace probes for debugging or testing in userland programs Date: Mon, 19 Dec 2016 16:04:11 -0800 In-Reply-To: Cc: "freebsd-arch@freebsd.org" , freebsd-current To: Adrian Chadd References: <20161220.043646.1181938468712455328.hrs@allbsd.org> X-Mailer: Apple Mail (2.3259) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 00:04:27 -0000 > On Dec 19, 2016, at 12:27 PM, Adrian Chadd = wrote: >=20 > 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. Thanks! We did a number of other things with ASL (Apple System Logger) which I = miss very much today and would hope to see in any FreeBSD equivalent: 1. We structured all log data into dictionaries, so every application = and/or subsystem within that application can add its own =E2=80=9Ctags=E2=80= =9D without squashing other key information. This also unified the = character encoding format, so some applications were no longer logging = in ISO-Latin1, others in UTF-8 and yet others in SHIFT-JIS. 2. There=E2=80=99s also a logging database, as one of the many possible = =E2=80=9Coutput sinks=E2=80=9D, so searches / queries are fast (and = there=E2=80=99s an API for querying and managing its contents). 3. We added client-side and server side logging filters, so you can = =E2=80=9Ccrank an application up=E2=80=9D or shut its mouth without = having to make any code changes. 4. It=E2=80=99s all thread-safe. - Jordan