Date: Sat, 12 May 2018 06:01:41 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333517 - head/cddl/usr.sbin/dwatch/libexec Message-ID: <201805120601.w4C61f9g037517@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Sat May 12 06:01:41 2018 New Revision: 333517 URL: https://svnweb.freebsd.org/changeset/base/333517 Log: dwatch(1): Allow `-E code' to override profile EVENT_DETAILS This allows quick changes to the formatted output of a profile. Sponsored by: Smule, Inc. Modified: head/cddl/usr.sbin/dwatch/libexec/chmod head/cddl/usr.sbin/dwatch/libexec/errno head/cddl/usr.sbin/dwatch/libexec/io head/cddl/usr.sbin/dwatch/libexec/ip head/cddl/usr.sbin/dwatch/libexec/kill head/cddl/usr.sbin/dwatch/libexec/nanosleep head/cddl/usr.sbin/dwatch/libexec/open head/cddl/usr.sbin/dwatch/libexec/proc head/cddl/usr.sbin/dwatch/libexec/rw head/cddl/usr.sbin/dwatch/libexec/sched head/cddl/usr.sbin/dwatch/libexec/sendrecv head/cddl/usr.sbin/dwatch/libexec/tcp head/cddl/usr.sbin/dwatch/libexec/udp head/cddl/usr.sbin/dwatch/libexec/vop_create head/cddl/usr.sbin/dwatch/libexec/vop_readdir head/cddl/usr.sbin/dwatch/libexec/vop_rename head/cddl/usr.sbin/dwatch/libexec/vop_symlink Modified: head/cddl/usr.sbin/dwatch/libexec/chmod ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/chmod Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/chmod Sat May 12 06:01:41 2018 (r333517) @@ -50,6 +50,7 @@ ID=$(( $ID + 1 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print mode/path details @@ -57,6 +58,7 @@ exec 9<<EOF printf("%04o %s", this->mode, this->path); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/errno ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/errno Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/errno Sat May 12 06:01:41 2018 (r333517) @@ -22,6 +22,7 @@ ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print errno details @@ -29,6 +30,7 @@ exec 9<<EOF printf("%s: %s (%i)", probefunc, strerror[errno], errno); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/io ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/io Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/io Sat May 12 06:01:41 2018 (r333517) @@ -85,6 +85,7 @@ ID=$(( $ID + 1 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print disk I/O details @@ -100,6 +101,7 @@ exec 9<<EOF this->bio_length == 1 ? "" : "s"); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/ip ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/ip Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/ip Sat May 12 06:01:41 2018 (r333517) @@ -76,6 +76,7 @@ EVENT_TAG=$( cat <&9 ) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print network I/O details @@ -89,6 +90,7 @@ exec 9<<EOF this->length == 1 ? "" : "s"); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/kill ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/kill Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/kill Sat May 12 06:01:41 2018 (r333517) @@ -32,6 +32,7 @@ ID=$(( $ID + 1 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print signal/pid details @@ -39,6 +40,7 @@ exec 9<<EOF printf("signal %i to pid %d", this->sig, this->pid); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/nanosleep ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/nanosleep Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/nanosleep Sat May 12 06:01:41 2018 (r333517) @@ -38,6 +38,7 @@ ID=$(( $ID + 1 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Dump nanosleep(2) arguments @@ -46,6 +47,7 @@ exec 9<<EOF this->requested_sec, this->requested_nsec / 100000); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/open ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/open Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/open Sat May 12 06:01:41 2018 (r333517) @@ -42,6 +42,7 @@ ID=$(( $ID + 1 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print path details @@ -49,6 +50,7 @@ exec 9<<EOF printf("%s", this->path); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/proc ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/proc Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/proc Sat May 12 06:01:41 2018 (r333517) @@ -149,6 +149,7 @@ ID=$(( $ID + 10 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print details @@ -156,6 +157,7 @@ exec 9<<EOF printf("%s %s", probealias[probename], this->details); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/rw ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/rw Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/rw Sat May 12 06:01:41 2018 (r333517) @@ -55,6 +55,7 @@ ID=$(( $ID + 1 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print read/write details @@ -66,6 +67,7 @@ exec 9<<EOF this->nbytes == 1 ? "" : "s"); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/sched ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/sched Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/sched Sat May 12 06:01:41 2018 (r333517) @@ -94,6 +94,7 @@ ID=$(( $ID + 6 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print scheduling details @@ -101,6 +102,7 @@ exec 9<<EOF printf("%s %s", probename, this->details); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/sendrecv ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/sendrecv Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/sendrecv Sat May 12 06:01:41 2018 (r333517) @@ -197,6 +197,7 @@ ID=$(( $ID + 5 )) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print socket details @@ -209,6 +210,7 @@ exec 9<<EOF this->details); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/tcp ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/tcp Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/tcp Sat May 12 06:01:41 2018 (r333517) @@ -212,6 +212,7 @@ EVENT_TAG=$( cat <&9 ) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print details @@ -223,6 +224,7 @@ exec 9<<EOF this->details); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/udp ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/udp Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/udp Sat May 12 06:01:41 2018 (r333517) @@ -90,6 +90,7 @@ EVENT_TAG=$( cat <&9 ) ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print network I/O details @@ -102,6 +103,7 @@ exec 9<<EOF this->length == 1 ? "" : "s"); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/vop_create ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/vop_create Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/vop_create Sat May 12 06:01:41 2018 (r333517) @@ -181,6 +181,7 @@ EVENT_TEST="this->fi_mount != 0" ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print full path @@ -188,6 +189,7 @@ exec 9<<EOF printf("%s", this->path); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/vop_readdir ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/vop_readdir Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/vop_readdir Sat May 12 06:01:41 2018 (r333517) @@ -173,6 +173,7 @@ EVENT_TEST="this->fi_mount != 0" ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print full path @@ -180,6 +181,7 @@ exec 9<<EOF printf("%s", this->path); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/vop_rename ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/vop_rename Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/vop_rename Sat May 12 06:01:41 2018 (r333517) @@ -287,6 +287,7 @@ EVENT_TEST="this->ffi_mount != 0 && this->tfi_mount != ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print 'from' and 'to' full paths @@ -294,6 +295,7 @@ exec 9<<EOF printf("%s -> %s", this->fpath, this->tpath); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END Modified: head/cddl/usr.sbin/dwatch/libexec/vop_symlink ============================================================================== --- head/cddl/usr.sbin/dwatch/libexec/vop_symlink Sat May 12 05:49:31 2018 (r333516) +++ head/cddl/usr.sbin/dwatch/libexec/vop_symlink Sat May 12 06:01:41 2018 (r333517) @@ -182,6 +182,7 @@ EVENT_TEST="this->fi_mount != 0" ############################################################ EVENT DETAILS +if [ ! "$CUSTOM_DETAILS" ]; then exec 9<<EOF /* * Print full path and target @@ -189,6 +190,7 @@ exec 9<<EOF printf("%s -> %s", this->path, this->target); EOF EVENT_DETAILS=$( cat <&9 ) +fi ################################################################################ # END
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805120601.w4C61f9g037517>