On Wed, Oct 19, 2005 at 12:17:00AM -0700, Noel Dellofano
wrote:> Has anyone run into a problem using %Y inside a printa?  I recently  
> upgraded a test machine from a a daily build of nevada from early june  
> to the daily.1017 bits.  Now when I run a script that used to run fine  
> on the old bits I get an error:
> 
> [fsh-ika 23:47] # ~/test.d
> dtrace: failed to compile script /home/nd150628/test.d: line 6: printa(  
> ) aggregating action is incompatible with conversion #1 prototype:
>         conversion: %Y
>          prototype: uint64_t
>           argument: int64_t
> 
> The script is simple:
> 
> #!/usr/sbin/dtrace -qs
> 
> dtrace:::BEGIN
> {
> @time = min(walltimestamp);
> printa("%@Y \n", @time);
> }
> 
> I''ve tested this on a few other machines running recent bits and I
get
> this error on all of them, it seems to only work correctly on machines  
> running older bits.  I also tried a similar script using only a regular  
> printf with a %Y argument and that works just fine.  I know there was a  
> discussion to change printa to print multiple aggregations awhile ago,  
> but I didn''t think anything had gone back yet.  At any rate has
anyone
> seen this?
Whoops -- I introduced this bug when I introduced arbitrary expressions for 
quantize()/lquantize() increments.  Needless to say, I didn''t
anticipate
taking the min() of a walltimestamp.  I''ll get this fixed in my current
wad (when I get back -- am currently in Australia).  Anyway, I''ll be
sure
to also add a regression test to make sure that we don''t break this
going
forward.  Sorry about that...
	- Bryan
--------------------------------------------------------------------------
Bryan Cantrill, Solaris Kernel Development.       http://blogs.sun.com/bmc