[RFT] llquantize for FreeBSD's dtrace
Fabian Keil
freebsd-listen at fabiankeil.de
Sat Jun 23 17:26:15 UTC 2012
Pedro Giffuni <pfg at freebsd.org> wrote:
> Hello Fabian;
>
> --- Sab 23/6/12, Fabian Keil ha scritto:
>
> > Pedro Giffuni <pfg at FreeBSD.org> wrote:
> >
> > > I am not a Dtrace user (yet) but I started to port the
> > Log/linear
> > > quantizations from Illumos:
> > >
> > > http://dtrace.org/blogs/bmc/2011/02/08/llquantize/
> > >
> > > Apparently this patch should do it:
> > >
> > > http://people.freebsd.org/~pfg/patches/patch-llquantize-complete
> > >
> > > Unfortunately when I tried to build current with Dtrace
> > > support, my i386 Virtualbox VM got stuck in ctfmerge so
> > > this is completely untested.
> > >
> > > Testers that know how to use it are welcome :).
> >
> > I applied it on 10-CURRENT amd64 from /usr/src with patch
> > -p0 without any conflicts, but it doesn't appear to be
> > working.
> >
> > The example from the blog post above triggers an assertion
> > that is still reproducible when reducing the test case:
> >
> > fk at r500 /tmp $sudo dtrace -n 'tick-1ms{@ = llquantize(i++,
> > 10, 0, 6, 20);}'
> > Assertion failed: (!(arg & (UINT16_MAX <<
> > args[i].shift))), file
> > /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c,
> > line 1429.
> >
>
> Thanks for testing!
>
> It seems like the syntax has changed from the time the
> example from the blog was made. The code says:
>
> /*
> * For log/linear quantizations, we have between one and five
> * arguments in addition to the expression:
> *
> * arg1 => Factor
> * arg2 => Low magnitude
> * arg3 => High magnitude
> * arg4 => Number of steps per magnitude
> * arg5 => Quantization increment value (defaults to 1)
> */
>
>
> My suggestion would be to instead try using the test
> scripts in
> cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/
>
> err.D_LLQUANT_FACTORSMALL.d (for example) has
>
> @ = llquantize(0, 1, 0, 10, 10);
The problem appears to be unrelated to the syntax change:
fk at r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize $sudo dtrace -s err.D_LLQUANT_FACTORSMALL.d
Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c, line 1429.
fk at r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize $sudo dtrace -s tst.bases.d
Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c, line 1429.
fk at r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize $sudo dtrace -s tst.negvalue.d
Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c, line 1429.
fk at r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize $sudo dtrace -s tst.steps.d
Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c, line 1429.
root at r500:/root # dtrace -s /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/tst.steps.d
Assertion failed: (!(arg & (UINT16_MAX << args[i].shift))), file /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c, line 1429.
Abort (core dumped)
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120623/cabdb98f/signature.pgp
More information about the freebsd-current
mailing list