Re: [RFT] llquantize for FreeBSD's dtrace

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Tue, 26 Jun 2012 21:06:06 +0200
Pedro Giffuni <pfg_at_freebsd.org> wrote:

> --- Mar 26/6/12, Mark Peek <mp_at_FreeBSD.org> ha scritto:

> > Try this, change the assert on line 1429 in file dt_cc.c
> > from:
> > 
> > assert(!(arg & (UINT16_MAX << args[i].shift)));
> > 
> > to
> > 
> > assert(!(arg & ((uint64_t)UINT16_MAX <<
> > args[i].shift)));
> > 
> 
> This certainly looks correct. Thanks Mark !
> 
> I updated the patch:
> 
> http://people.freebsd.org/~pfg/patches/patch-dtrace-llquantize

Thanks a lot. Seems to work for me:

fk_at_r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize $for t in tst.*.d; do sudo dtrace -s $t > $t.myout; diff $t.out $t.myout && echo success for $t; done
success for tst.bases.d
success for tst.basic.d
success for tst.negorder.d
success for tst.negvalue.d
success for tst.normal.d
success for tst.range.d
success for tst.steps.d
success for tst.trunc.d
fk_at_r500 /usr/src/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize $for t in err.*.d; do sudo dtrace -s $t
dtrace: failed to compile script err.D_LLQUANT_FACTOREVEN.nodivide.d: line 28: llquantize( ) factor (argument #1) must evenly divide the number of steps per magnitude (argument #4), and the number of steps per magnitude must evenly divide a power of the factor
dtrace: failed to compile script err.D_LLQUANT_FACTOREVEN.notfactor.d: line 28: llquantize( ) factor (argument #1) must evenly divide the number of steps per magnitude (argument #4), and the number of steps per magnitude must evenly divide a power of the factor
dtrace: failed to compile script err.D_LLQUANT_FACTORMATCH.d: line 29: llquantize( ) factor (argument #1) doesn't match previous declaration: expected 10, found 3
dtrace: failed to compile script err.D_LLQUANT_FACTORNSTEPS.d: line 28: llquantize( ) factor (argument #1) must be less than or equal to the number of linear steps per magnitude (argument #4)
dtrace: failed to compile script err.D_LLQUANT_FACTORSMALL.d: line 28: llquantize( ) factor (argument #1) must be two or more
dtrace: failed to compile script err.D_LLQUANT_FACTORTYPE.d: line 29: llquantize( ) argument #1 (factor) must be an integer constant
dtrace: failed to compile script err.D_LLQUANT_FACTORVAL.d: line 28: llquantize( ) argument #1 (factor) must be an unsigned 16-bit quantity
dtrace: failed to compile script err.D_LLQUANT_HIGHMATCH.d: line 29: llquantize( ) high magnitude (argument #3) doesn't match previous declaration: expected 10, found 11
dtrace: failed to compile script err.D_LLQUANT_HIGHTYPE.d: line 29: llquantize( ) argument #3 (high magnitude) must be an integer constant
dtrace: failed to compile script err.D_LLQUANT_HIGHVAL.d: line 28: llquantize( ) argument #3 (high magnitude) must be an unsigned 16-bit quantity
dtrace: failed to compile script err.D_LLQUANT_LOWMATCH.d: line 29: llquantize( ) low magnitude (argument #2) doesn't match previous declaration: expected 0, found 1
dtrace: failed to compile script err.D_LLQUANT_LOWTYPE.d: line 29: llquantize( ) argument #2 (low magnitude) must be an integer constant
dtrace: failed to compile script err.D_LLQUANT_LOWVAL.d: line 28: llquantize( ) argument #2 (low magnitude) must be an unsigned 16-bit quantity
dtrace: failed to compile script err.D_LLQUANT_MAGRANGE.d: line 28: llquantize( ) high magnitude (argument #3) must be greater than low magnitude (argument #2)
dtrace: failed to compile script err.D_LLQUANT_MAGTOOBIG.d: line 28: llquantize( ) factor (10) raised to power of high magnitude (100) overflows 64-bits
dtrace: failed to compile script err.D_LLQUANT_NSTEPMATCH.d: line 29: llquantize( ) linear steps per magnitude (argument #4) doesn't match previous declaration: expected 10, found 100
dtrace: failed to compile script err.D_LLQUANT_NSTEPTYPE.d: line 29: llquantize( ) argument #4 (linear steps per magnitude) must be an integer constant
dtrace: failed to compile script err.D_LLQUANT_NSTEPVAL.d: line 28: llquantize( ) argument #4 (linear steps per magnitude) must be an unsigned 16-bit quantity

Fabian

Received on Tue Jun 26 2012 - 17:06:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:28 UTC