From owner-svn-src-head@freebsd.org Sun May 27 22:27:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 229E8EEEDBE; Sun, 27 May 2018 22:27:48 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4ADB715CC; Sun, 27 May 2018 22:27:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A71F6248A9; Sun, 27 May 2018 22:27:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4RMRlDY050483; Sun, 27 May 2018 22:27:47 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4RMRlGX050482; Sun, 27 May 2018 22:27:47 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201805272227.w4RMRlGX050482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 27 May 2018 22:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334261 - head/cddl/usr.sbin/dwatch X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/cddl/usr.sbin/dwatch X-SVN-Commit-Revision: 334261 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 May 2018 22:27:48 -0000 Author: dteske Date: Sun May 27 22:27:47 2018 New Revision: 334261 URL: https://svnweb.freebsd.org/changeset/base/334261 Log: dwatch(1): Guard against error when given -t "*..." dwatch allows you to customnize the predicate (condition) for when information is displayed. The DTrace syntax for this is: probe[, ...] /predicate/ { [actions] } But if predicate is something like "*args[1]!=NULL" to test that the first pointer in an array is non-NULL, the syntax produced is: probe[, ...] /*arg1!=NULL/ { [actions] } The issue being that "/*" is the beginning of a comment and thus the following error is emitted: dtrace: failed to compile script /dev/stdin: line 535: /* encountered inside a comment This patch adds whitespace around the argument given to -t, producing: probe[, ...] / *arg1!=NULL / { [actions] } Sponsored by: Smule, Inc. Modified: head/cddl/usr.sbin/dwatch/dwatch Modified: head/cddl/usr.sbin/dwatch/dwatch ============================================================================== --- head/cddl/usr.sbin/dwatch/dwatch Sun May 27 20:36:43 2018 (r334260) +++ head/cddl/usr.sbin/dwatch/dwatch Sun May 27 22:27:47 2018 (r334261) @@ -47,7 +47,7 @@ DTRACE_PRAGMA=" ############################################################ GLOBALS -VERSION='$Version: 1.2 $' # -V +VERSION='$Version: 1.3 $' # -V pgm="${0##*/}" # Program basename @@ -1353,7 +1353,7 @@ $ACTIONS } /*********************************************************/ -$PROBE${EVENT_TEST:+ /$EVENT_TEST/} /* probe ID $ID */ +$PROBE${EVENT_TEST:+ / $EVENT_TEST /} /* probe ID $ID */ {${TRACE:+ printf("<$ID>"); }