Author: dteske
Date: Sat May 12 06:18:15 2018
New Revision: 333518
URL: https://svnweb.freebsd.org/changeset/base/333518

Log:
  dwatch(1): Expose process for ip/tcp/udp
  
  Knowing the value of execname during these probes is of some value even
  if it is commonly the interrupt kernel thread (intr[12]) -- quite often
  it is not, but that depends on the probe.
  
  Sponsored by: Smule, Inc.

Modified:
  head/cddl/usr.sbin/dwatch/libexec/ip
  head/cddl/usr.sbin/dwatch/libexec/tcp
  head/cddl/usr.sbin/dwatch/libexec/udp

Modified: head/cddl/usr.sbin/dwatch/libexec/ip
==============================================================================
--- head/cddl/usr.sbin/dwatch/libexec/ip        Sat May 12 06:01:41 2018        
(r333517)
+++ head/cddl/usr.sbin/dwatch/libexec/ip        Sat May 12 06:18:15 2018        
(r333518)
@@ -17,20 +17,6 @@ ip) : ${PROBE:=ip:::send, ip:::receive} ;;
  *) : ${PROBE:=ip:::${PROFILE#ip-}}
 esac
 
-############################################################ GLOBALS
-
-#
-# This profile does not support these dwatch features
-# NB: They are disabled here so they have no effect when profile is loaded
-#
-unset EXECNAME         # -k name
-unset EXECREGEX                # -z regex
-unset GROUP            # -g group
-unset PID              # -p pid
-unset PSARGS           # affects -d
-unset PSTREE           # -R
-unset USER             # -u user
-
 ############################################################ ACTIONS
 
 exec 9<<EOF
@@ -66,13 +52,6 @@ $PROBE /* probe ID $ID */
 EOF
 ACTIONS=$( cat <&9 )
 ID=$(( $ID + 1 ))
-
-############################################################ EVENT TAG
-
-exec 9<<EOF
-       printf("%s: ", "$PROFILE");
-EOF
-EVENT_TAG=$( cat <&9 )
 
 ############################################################ EVENT DETAILS
 

Modified: head/cddl/usr.sbin/dwatch/libexec/tcp
==============================================================================
--- head/cddl/usr.sbin/dwatch/libexec/tcp       Sat May 12 06:01:41 2018        
(r333517)
+++ head/cddl/usr.sbin/dwatch/libexec/tcp       Sat May 12 06:18:15 2018        
(r333518)
@@ -55,20 +55,6 @@ tcp-status)
        : ${PROBE:=tcp:::${PROFILE#tcp-}}
 esac
 
-############################################################ GLOBALS
-
-#
-# This profile does not support these dwatch features
-# NB: They are disabled here so they have no effect when profile is loaded
-#
-unset EXECNAME         # -k name
-unset EXECREGEX                # -z regex
-unset GROUP            # -g group
-unset PID              # -p pid
-unset PSARGS           # affects -d
-unset PSTREE           # -R
-unset USER             # -u user
-
 ############################################################ ACTIONS
 
 exec 9<<EOF
@@ -202,13 +188,6 @@ tcp:::send, tcp:::receive /* pribe ID $(( $ID + 3 )) *
 EOF
 ACTIONS=$( cat <&9 )
 ID=$(( $ID + 4 ))
-
-############################################################ EVENT TAG
-
-exec 9<<EOF
-       printf("%s: ", "$PROFILE");
-EOF
-EVENT_TAG=$( cat <&9 )
 
 ############################################################ EVENT DETAILS
 

Modified: head/cddl/usr.sbin/dwatch/libexec/udp
==============================================================================
--- head/cddl/usr.sbin/dwatch/libexec/udp       Sat May 12 06:01:41 2018        
(r333517)
+++ head/cddl/usr.sbin/dwatch/libexec/udp       Sat May 12 06:18:15 2018        
(r333518)
@@ -17,20 +17,6 @@ udp) : ${PROBE:=udp:::send, udp:::receive} ;;
   *) : ${PROBE:=udp:::${PROFILE#udp-}}
 esac
 
-############################################################ GLOBALS
-
-#
-# This profile does not support these dwatch features
-# NB: They are disabled here so they have no effect when profile is loaded
-#
-unset EXECNAME         # -k name
-unset EXECREGEX                # -z regex
-unset GROUP            # -g group
-unset PID              # -p pid
-unset PSARGS           # affects -d
-unset PSTREE           # -R
-unset USER             # -u user
-
 ############################################################ ACTIONS
 
 exec 9<<EOF
@@ -80,13 +66,6 @@ $PROBE /* probe ID $ID */
 EOF
 ACTIONS=$( cat <&9 )
 ID=$(( $ID + 1 ))
-
-############################################################ EVENT TAG
-
-exec 9<<EOF
-       printf("%s: ", "$PROFILE");
-EOF
-EVENT_TAG=$( cat <&9 )
 
 ############################################################ EVENT DETAILS
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to