From owner-freebsd-current@FreeBSD.ORG Sat Jun 23 17:26:15 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C2A4106564A; Sat, 23 Jun 2012 17:26:15 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.31.29]) by mx1.freebsd.org (Postfix) with ESMTP id D05A58FC18; Sat, 23 Jun 2012 17:26:14 +0000 (UTC) Received: from [78.35.163.91] (helo=fabiankeil.de) by smtprelay02.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1SiU63-0001An-PD; Sat, 23 Jun 2012 19:26:07 +0200 Date: Sat, 23 Jun 2012 19:25:54 +0200 From: Fabian Keil To: pfg@freebsd.org Message-ID: <20120623192554.3a0fb7e8@fabiankeil.de> In-Reply-To: <1340470358.2705.YahooMailClassic@web113519.mail.gq1.yahoo.com> References: <20120623133624.3433ec78@fabiankeil.de> <1340470358.2705.YahooMailClassic@web113519.mail.gq1.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/JzLZ8_fjHQhpoKyebKmhsJo"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Cc: freebsd-current@FreeBSD.org Subject: Re: [RFT] llquantize for FreeBSD's dtrace X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jun 2012 17:26:15 -0000 --Sig_/JzLZ8_fjHQhpoKyebKmhsJo Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Pedro Giffuni wrote: > Hello Fabian; >=20 > --- Sab 23/6/12, Fabian Keil ha scritto: >=20 > > Pedro Giffuni wrote: > >=20 > > > I am not a Dtrace user (yet) but I started to port the > > Log/linear > > > quantizations from Illumos: > > >=20 > > > http://dtrace.org/blogs/bmc/2011/02/08/llquantize/ > > >=20 > > > Apparently this patch should do it: > > >=20 > > > http://people.freebsd.org/~pfg/patches/patch-llquantize-complete > > >=20 > > > Unfortunately when I tried to build current with Dtrace > > > support, my i386 Virtualbox VM got stuck in ctfmerge so > > > this is completely untested. > > >=20 > > > Testers that know how to use it are welcome :). > >=20 > > I applied it on 10-CURRENT amd64 from /usr/src with patch > > -p0 without any conflicts, but it doesn't appear to be > > working. > >=20 > > The example from the blog post above triggers an assertion > > that is still reproducible when reducing the test case: > >=20 > > fk@r500 /tmp $sudo dtrace -n 'tick-1ms{@ =3D llquantize(i++, > > 10, 0, 6, 20);}' > > Assertion failed: (!(arg & (UINT16_MAX << > > args[i].shift))), file > > /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdt= race/common/dt_cc.c, > > line 1429. > > >=20 > Thanks for testing! >=20 > It seems like the syntax has changed from the time the > example from the blog was made. The code says: >=20 > /* > * For log/linear quantizations, we have between one and five > * arguments in addition to the expression: > * > * arg1 =3D> Factor > * arg2 =3D> Low magnitude > * arg3 =3D> High magnitude > * arg4 =3D> Number of steps per magnitude > * arg5 =3D> Quantization increment value (defaults to 1) > */ >=20 >=20 > My suggestion would be to instead try using the test > scripts in > cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/ >=20 > err.D_LLQUANT_FACTORSMALL.d (for example) has >=20 > @ =3D llquantize(0, 1, 0, 10, 10); The problem appears to be unrelated to the syntax change: fk@r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquan= tize $sudo dtrace -s err.D_LLQUANT_FACTORSMALL.d Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/c= ddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt= _cc.c, line 1429. fk@r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquan= tize $sudo dtrace -s tst.bases.d Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/c= ddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt= _cc.c, line 1429. fk@r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquan= tize $sudo dtrace -s tst.negvalue.d Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/c= ddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt= _cc.c, line 1429. fk@r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquan= tize $sudo dtrace -s tst.steps.d Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/c= ddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt= _cc.c, line 1429. root@r500:/root # dtrace -s /usr/src/cddl/contrib/opensolaris/cmd/dtrace/te= st/tst/common/llquantize/tst.steps.d Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/c= ddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt= _cc.c, line 1429. Abort (core dumped) Fabian --Sig_/JzLZ8_fjHQhpoKyebKmhsJo Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/l/CYACgkQBYqIVf93VJ2OTgCguroNhM7ItOH2Jkfy0Jzq7NPe Ny4An2ciB1CzLAQr2yHlMJIEqI3Rnas5 =UZGY -----END PGP SIGNATURE----- --Sig_/JzLZ8_fjHQhpoKyebKmhsJo--