From owner-freebsd-current@FreeBSD.ORG Sat Oct 8 00:48:13 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1A3C106566C for ; Sat, 8 Oct 2011 00:48:13 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id 842308FC08 for ; Sat, 8 Oct 2011 00:48:13 +0000 (UTC) Received: from [209.249.190.124] (helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1RCB65-0006DM-L2 for current@freebsd.org; Fri, 07 Oct 2011 10:08:21 -0400 From: George Neville-Neil Content-Type: multipart/mixed; boundary="Apple-Mail=_D5A06F2A-CFAD-4B9F-8510-8BCBB86E6612" Date: Fri, 7 Oct 2011 10:08:22 -0400 Message-Id: <3F00228B-857B-472E-926B-9BEFE9B3557A@freebsd.org> To: current@freebsd.org Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org Cc: Subject: A patch for a bug in the dtrace command... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2011 00:48:13 -0000 --Apple-Mail=_D5A06F2A-CFAD-4B9F-8510-8BCBB86E6612 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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 { @[execname] =3D quantize(arg0); }' While is should print this: dtrace -n 'syscall:::entry { @[execname] =3D quantize(arg0); }' dtrace: description 'syscall:::entry ' matched 1028 probes ^C nrpe2 =20 value ------------- Distribution ------------- count =20 2 | 0 =20 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 =20 8 | 0 =20 sshd =20 value ------------- Distribution ------------- count =20 0 | 0 =20 1 |@@@@@@@@@@ 5 =20 2 |@@@@@@@@@@@@@@ 7 =20 4 | 0 =20 8 |@@@@@@@@@@@@@@@@ 8 =20 16 | 0 =20 etc. I have made the following patch, but I'd be interested in people testing = and commenting on it. Best, George --Apple-Mail=_D5A06F2A-CFAD-4B9F-8510-8BCBB86E6612 Content-Disposition: attachment; filename=dtrace.c.signal.diff Content-Type: application/octet-stream; x-unix-mode=0664; name="dtrace.c.signal.diff" Content-Transfer-Encoding: 7bit Index: dtrace.c =================================================================== --- dtrace.c (revision 217284) +++ dtrace.c (revision 225366) @@ -70,6 +70,8 @@ #define E_ERROR 1 #define E_USAGE 2 +#define IMPATIENT_LIMIT 2 + static const char DTRACE_OPTSTR[] = "3:6:aAb:Bc:CD:ef:FGhHi:I:lL:m:n:o:p:P:qs:SU:vVwx:X:Z"; @@ -1199,7 +1201,7 @@ if (!g_intr) g_newline = 1; - if (g_intr++) + if (g_intr++ > IMPATIENT_LIMIT) g_impatient = 1; } --Apple-Mail=_D5A06F2A-CFAD-4B9F-8510-8BCBB86E6612--