From owner-freebsd-current@freebsd.org Mon Dec 19 20:47:26 2016 Return-Path: Delivered-To: freebsd-current@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 3443CC883B9; Mon, 19 Dec 2016 20:47:26 +0000 (UTC) (envelope-from domagoj.stolfa@gmail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B871A1E8B; Mon, 19 Dec 2016 20:47:25 +0000 (UTC) (envelope-from domagoj.stolfa@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id u144so20726171wmu.0; Mon, 19 Dec 2016 12:47:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4dU+jL/x/Vq3LLr6s2F9LlEkuOY0CzvJtWJTvyrH+j4=; b=X5185aUuzKLoUcCdsibFgK9s1GJVFfnJTDFFYJ/dj+mjf8MxiCIaCrHFwBqjDLcYrz 2oDWWEV98wqWFI8oUUTq+xqQ4tDoxJwN5dWKn8HUCVVGVh8GqMrmeHPMVB8HTOrOh2ON ddY4KoPOTGat/YhqM1p9qAF4KTg0gTAbGlBvkJ3tUUn4Cgte83AOy3o7g1rAfjEqi4kb KDH0AV3YWZ/hgpabOLM3aPmheVKvTYabLRLtFhZVoeLOJBOOA4NnOFmn3MZtrTRdBfh6 VEnK+vwdCc9Y0dwquij7zjBWdGOO9SFC3L9ZNHOW0Xjx1L7vtRx0Wtxz3Ao/RnpL/dPC jSKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4dU+jL/x/Vq3LLr6s2F9LlEkuOY0CzvJtWJTvyrH+j4=; b=h8nGhcz8WikvwWRzJyFoTThE8s2drBvC3xKBTjnVPfqiSMgI0Wd12nO27mqz+BYvpt k9Qw4BhA0o60mdtvCqP0OmEDi54mmgnLbAGTwRvlQHb2rxVC6/AwYCf9Kg92tRILSZSs vJDKgHlzgyNdbXAyavHwEThxI7lUeHeKpkG3HczUPbcEr2LkpaS6rHotcKUbuXpHTea0 D39/PICTWtJ8vMWztdhzQmZzlSh6Snzwaop4wnXKWjcnN5UYDUiifbb4oYWYVbWW8wmq ErWlGLfD4347G8plDdaucpSO/iZSNVVr1DbPP+E8BSxSdo5lVlTFMpLIuDXDNT4FKuNJ RAXw== X-Gm-Message-State: AIkVDXLiVOLrkpxKNyEfaR1PZaA1DeSUheQLztpz6PFP+RrkuKoq1r4HTaN7gcXRBlTwFg== X-Received: by 10.28.180.214 with SMTP id d205mr15994284wmf.131.1482180443066; Mon, 19 Dec 2016 12:47:23 -0800 (PST) Received: from freebsd-laptop (213-202-67-199.dsl.iskon.hr. [213.202.67.199]) by smtp.gmail.com with ESMTPSA id 14sm18898985wmk.1.2016.12.19.12.47.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Dec 2016 12:47:22 -0800 (PST) Date: Mon, 19 Dec 2016 21:47:19 +0100 From: Domagoj Stolfa To: Adrian Chadd Cc: "freebsd-arch@freebsd.org" , freebsd-current Subject: RFC: DTrace probes for debugging or testing in userland programs Message-ID: <20161219204719.GE65993@freebsd-laptop> References: <20161220.043646.1181938468712455328.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/Zw+/jwnNHcBRYYu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2016 20:47:26 -0000 --/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--