A patch for a bug in the dtrace command...

From: George Neville-Neil <gnn_at_freebsd.org>
Date: Fri, 7 Oct 2011 10:08:22 -0400
Hi,

I have found that the dtrace command on FreeBSD, in both STABLE and HEAD, does not print out
aggregations properly, likely due to the difference in how Solaris and FreeBSD signals work.
For example, this one liner will give no output:

sudo dtrace -n 'syscall:::entry { _at_[execname] = quantize(arg0); }'

While is should print this:

dtrace -n 'syscall:::entry { _at_[execname] = quantize(arg0); }'
dtrace: description 'syscall:::entry ' matched 1028 probes
^C

  nrpe2                                             
           value  ------------- Distribution ------------- count    
               2 |                                         0        
               4 |_at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at_ 12       
               8 |                                         0        

  sshd                                              
           value  ------------- Distribution ------------- count    
               0 |                                         0        
               1 |_at__at__at__at__at__at__at__at__at__at_                               5        
               2 |_at__at__at__at__at__at__at__at__at__at__at__at__at__at_                           7        
               4 |                                         0        
               8 |_at__at__at__at__at__at__at__at__at__at__at__at__at__at__at__at_                         8        
              16 |                                         0        

etc.

I have made the following patch, but I'd be interested in people testing and commenting on it.

Best,
George


Received on Fri Oct 07 2011 - 22:48:13 UTC

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