svn commit: r289798 - in stable/10/sys: compat/linux kern tools

Andriy Gapon avg at FreeBSD.org
Fri Oct 23 07:40:46 UTC 2015


Author: avg
Date: Fri Oct 23 07:40:43 2015
New Revision: 289798
URL: https://svnweb.freebsd.org/changeset/base/289798

Log:
  MFC r288336: save some bytes by using more concise SDT_PROBE<n>

Modified:
  stable/10/sys/compat/linux/linux_dtrace.h
  stable/10/sys/kern/kern_exec.c
  stable/10/sys/kern/kern_exit.c
  stable/10/sys/kern/kern_fork.c
  stable/10/sys/kern/kern_proc.c
  stable/10/sys/kern/kern_racct.c
  stable/10/sys/kern/kern_sig.c
  stable/10/sys/kern/kern_timeout.c
  stable/10/sys/kern/vfs_cache.c
  stable/10/sys/kern/vfs_lookup.c
  stable/10/sys/kern/vfs_syscalls.c
  stable/10/sys/tools/vnode_if.awk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_dtrace.h
==============================================================================
--- stable/10/sys/compat/linux/linux_dtrace.h	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/compat/linux/linux_dtrace.h	Fri Oct 23 07:40:43 2015	(r289798)
@@ -82,7 +82,7 @@
     c, d, e, f)
 #define	LIN_SDT_PROBE4(a, b, c, d, e, f, g)	SDT_PROBE4(LINUX_DTRACE, a, b, \
     c, d, e, f, g)
-#define	_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)	SDT_PROBE(a, b, c, d, \
+#define	_LIN_SDT_PROBE5(a, b, c, d, e, f, g, h, i)	SDT_PROBE5(a, b, c, d, \
     e, f, g, h, i)
 #define	LIN_SDT_PROBE5(a, b, c, d, e, f, g, h)	_LIN_SDT_PROBE5(LINUX_DTRACE, \
     a, b, c, d, e, f, g, h)

Modified: stable/10/sys/kern/kern_exec.c
==============================================================================
--- stable/10/sys/kern/kern_exec.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_exec.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -416,7 +416,7 @@ do_execve(td, args, mac_p)
 		    | AUDITVNODE1, UIO_SYSSPACE, args->fname, td);
 	}
 
-	SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 );
+	SDT_PROBE1(proc, kernel, , exec, args->fname);
 
 interpret:
 	if (args->fname != NULL) {
@@ -838,7 +838,7 @@ interpret:
 
 	vfs_mark_atime(imgp->vp, td->td_ucred);
 
-	SDT_PROBE(proc, kernel, , exec__success, args->fname, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exec__success, args->fname);
 
 	VOP_UNLOCK(imgp->vp, 0);
 done1:
@@ -909,7 +909,7 @@ exec_fail:
 	p->p_flag &= ~P_INEXEC;
 	PROC_UNLOCK(p);
 
-	SDT_PROBE(proc, kernel, , exec__failure, error, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exec__failure, error);
 
 done2:
 #ifdef MAC

Modified: stable/10/sys/kern/kern_exit.c
==============================================================================
--- stable/10/sys/kern/kern_exit.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_exit.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -564,7 +564,7 @@ exit1(struct thread *td, int rv)
 		reason = CLD_DUMPED;
 	else if (WIFSIGNALED(rv))
 		reason = CLD_KILLED;
-	SDT_PROBE(proc, kernel, , exit, reason, 0, 0, 0, 0);
+	SDT_PROBE1(proc, kernel, , exit, reason);
 #endif
 
 	/*

Modified: stable/10/sys/kern/kern_fork.c
==============================================================================
--- stable/10/sys/kern/kern_fork.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_fork.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -753,7 +753,7 @@ do_fork(struct thread *td, int flags, st
 	 * Tell any interested parties about the new process.
 	 */
 	knote_fork(&p1->p_klist, p2->p_pid);
-	SDT_PROBE(proc, kernel, , create, p2, p1, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, , create, p2, p1, flags);
 
 	/*
 	 * Wait until debugger is attached to child.

Modified: stable/10/sys/kern/kern_proc.c
==============================================================================
--- stable/10/sys/kern/kern_proc.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_proc.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -181,9 +181,9 @@ proc_ctor(void *mem, int size, void *arg
 	struct proc *p;
 
 	p = (struct proc *)mem;
-	SDT_PROBE(proc, kernel, ctor , entry, p, size, arg, flags, 0);
+	SDT_PROBE4(proc, kernel, ctor , entry, p, size, arg, flags);
 	EVENTHANDLER_INVOKE(process_ctor, p);
-	SDT_PROBE(proc, kernel, ctor , return, p, size, arg, flags, 0);
+	SDT_PROBE4(proc, kernel, ctor , return, p, size, arg, flags);
 	return (0);
 }
 
@@ -199,7 +199,7 @@ proc_dtor(void *mem, int size, void *arg
 	/* INVARIANTS checks go here */
 	p = (struct proc *)mem;
 	td = FIRST_THREAD_IN_PROC(p);
-	SDT_PROBE(proc, kernel, dtor, entry, p, size, arg, td, 0);
+	SDT_PROBE4(proc, kernel, dtor, entry, p, size, arg, td);
 	if (td != NULL) {
 #ifdef INVARIANTS
 		KASSERT((p->p_numthreads == 1),
@@ -212,7 +212,7 @@ proc_dtor(void *mem, int size, void *arg
 	EVENTHANDLER_INVOKE(process_dtor, p);
 	if (p->p_ksi != NULL)
 		KASSERT(! KSI_ONQ(p->p_ksi), ("SIGCHLD queue"));
-	SDT_PROBE(proc, kernel, dtor, return, p, size, arg, 0, 0);
+	SDT_PROBE3(proc, kernel, dtor, return, p, size, arg);
 }
 
 /*
@@ -224,7 +224,7 @@ proc_init(void *mem, int size, int flags
 	struct proc *p;
 
 	p = (struct proc *)mem;
-	SDT_PROBE(proc, kernel, init, entry, p, size, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, init, entry, p, size, flags);
 	p->p_sched = (struct p_sched *)&p[1];
 	bzero(&p->p_mtx, sizeof(struct mtx));
 	mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK);
@@ -234,7 +234,7 @@ proc_init(void *mem, int size, int flags
 	TAILQ_INIT(&p->p_threads);	     /* all threads in proc */
 	EVENTHANDLER_INVOKE(process_init, p);
 	p->p_stats = pstats_alloc();
-	SDT_PROBE(proc, kernel, init, return, p, size, flags, 0, 0);
+	SDT_PROBE3(proc, kernel, init, return, p, size, flags);
 	return (0);
 }
 

Modified: stable/10/sys/kern/kern_racct.c
==============================================================================
--- stable/10/sys/kern/kern_racct.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_racct.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -447,7 +447,7 @@ racct_create(struct racct **racctp)
 	if (!racct_enable)
 		return;
 
-	SDT_PROBE(racct, kernel, racct, create, racctp, 0, 0, 0, 0);
+	SDT_PROBE1(racct, kernel, racct, create, racctp);
 
 	KASSERT(*racctp == NULL, ("racct already allocated"));
 
@@ -462,7 +462,7 @@ racct_destroy_locked(struct racct **racc
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, racct, destroy, racctp, 0, 0, 0, 0);
+	SDT_PROBE1(racct, kernel, racct, destroy, racctp);
 
 	mtx_assert(&racct_lock, MA_OWNED);
 	KASSERT(racctp != NULL, ("NULL racctp"));
@@ -540,7 +540,7 @@ racct_add_locked(struct proc *p, int res
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, add, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -550,8 +550,8 @@ racct_add_locked(struct proc *p, int res
 #ifdef RCTL
 	error = rctl_enforce(p, resource, amount);
 	if (error && RACCT_IS_DENIABLE(resource)) {
-		SDT_PROBE(racct, kernel, rusage, add__failure, p, resource,
-		    amount, 0, 0);
+		SDT_PROBE3(racct, kernel, rusage, add__failure, p, resource,
+		    amount);
 		return (error);
 	}
 #endif
@@ -586,8 +586,7 @@ racct_add_cred_locked(struct ucred *cred
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount,
-	    0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add__cred, cred, resource, amount);
 
 	racct_adjust_resource(cred->cr_ruidinfo->ui_racct, resource, amount);
 	for (pr = cred->cr_prison; pr != NULL; pr = pr->pr_parent)
@@ -625,7 +624,7 @@ racct_add_force(struct proc *p, int reso
 	if (!racct_enable)
 		return;
 
-	SDT_PROBE(racct, kernel, rusage, add__force, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, add__force, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -649,7 +648,7 @@ racct_set_locked(struct proc *p, int res
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -681,8 +680,8 @@ racct_set_locked(struct proc *p, int res
 	if (diff_proc > 0) {
 		error = rctl_enforce(p, resource, diff_proc);
 		if (error && RACCT_IS_DENIABLE(resource)) {
-			SDT_PROBE(racct, kernel, rusage, set__failure, p,
-			    resource, amount, 0, 0);
+			SDT_PROBE3(racct, kernel, rusage, set__failure, p,
+			    resource, amount);
 			return (error);
 		}
 	}
@@ -725,7 +724,7 @@ racct_set_force_locked(struct proc *p, i
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, set, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -836,7 +835,7 @@ racct_sub(struct proc *p, int resource, 
 	if (!racct_enable)
 		return;
 
-	SDT_PROBE(racct, kernel, rusage, sub, p, resource, amount, 0, 0);
+	SDT_PROBE3(racct, kernel, rusage, sub, p, resource, amount);
 
 	/*
 	 * We need proc lock to dereference p->p_ucred.
@@ -863,8 +862,7 @@ racct_sub_cred_locked(struct ucred *cred
 
 	ASSERT_RACCT_ENABLED();
 
-	SDT_PROBE(racct, kernel, rusage, sub__cred, cred, resource, amount,
-	    0, 0);
+	SDT_PROBE3(racct, kernel, rusage, sub__cred, cred, resource, amount);
 
 #ifdef notyet
 	KASSERT(RACCT_CAN_DROP(resource),

Modified: stable/10/sys/kern/kern_sig.c
==============================================================================
--- stable/10/sys/kern/kern_sig.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_sig.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -1291,7 +1291,7 @@ kern_sigtimedwait(struct thread *td, sig
 		reschedule_signals(p, new_block, 0);
 
 	if (error == 0) {
-		SDT_PROBE(proc, kernel, , signal__clear, sig, ksi, 0, 0, 0);
+		SDT_PROBE2(proc, kernel, , signal__clear, sig, ksi);
 
 		if (ksi->ksi_code == SI_TIMER)
 			itimer_accept(p, ksi->ksi_timerid, ksi);
@@ -2108,7 +2108,7 @@ tdsendsignal(struct proc *p, struct thre
 	} else
 		sigqueue = &td->td_sigqueue;
 
-	SDT_PROBE(proc, kernel, , signal__send, td, p, sig, 0, 0 );
+	SDT_PROBE3(proc, kernel, , signal__send, td, p, sig);
 
 	/*
 	 * If the signal is being ignored,
@@ -2119,7 +2119,7 @@ tdsendsignal(struct proc *p, struct thre
 	 */
 	mtx_lock(&ps->ps_mtx);
 	if (SIGISMEMBER(ps->ps_sigignore, sig)) {
-		SDT_PROBE(proc, kernel, , signal__discard, td, p, sig, 0, 0 );
+		SDT_PROBE3(proc, kernel, , signal__discard, td, p, sig);
 
 		mtx_unlock(&ps->ps_mtx);
 		if (ksi && (ksi->ksi_flags & KSI_INS))

Modified: stable/10/sys/kern/kern_timeout.c
==============================================================================
--- stable/10/sys/kern/kern_timeout.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/kern_timeout.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -681,9 +681,9 @@ softclock_call_cc(struct callout *c, str
 	sbt1 = sbinuptime();
 #endif
 	THREAD_NO_SLEEPING();
-	SDT_PROBE(callout_execute, kernel, , callout__start, c, 0, 0, 0, 0);
+	SDT_PROBE1(callout_execute, kernel, , callout__start, c);
 	c_func(c_arg);
-	SDT_PROBE(callout_execute, kernel, , callout__end, c, 0, 0, 0, 0);
+	SDT_PROBE1(callout_execute, kernel, , callout__end, c);
 	THREAD_SLEEPING_OK();
 #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING)
 	sbt2 = sbinuptime();

Modified: stable/10/sys/kern/vfs_cache.c
==============================================================================
--- stable/10/sys/kern/vfs_cache.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/vfs_cache.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -420,11 +420,11 @@ cache_zap(ncp)
 	CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, ncp->nc_vp);
 #ifdef KDTRACE_HOOKS
 	if (ncp->nc_vp != NULL) {
-		SDT_PROBE(vfs, namecache, zap, done, ncp->nc_dvp,
-		    nc_get_name(ncp), ncp->nc_vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp,
+		    nc_get_name(ncp), ncp->nc_vp);
 	} else {
-		SDT_PROBE(vfs, namecache, zap_negative, done, ncp->nc_dvp,
-		    nc_get_name(ncp), 0, 0, 0);
+		SDT_PROBE2(vfs, namecache, zap_negative, done, ncp->nc_dvp,
+		    nc_get_name(ncp));
 	}
 #endif
 	vp = NULL;
@@ -499,8 +499,7 @@ retry_wlocked:
 			CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .",
 			    dvp, cnp->cn_nameptr);
 			dothits++;
-			SDT_PROBE(vfs, namecache, lookup, hit, dvp, ".",
-			    *vpp, 0, 0);
+			SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp);
 			if (tsp != NULL)
 				timespecclear(tsp);
 			if (ticksp != NULL)
@@ -510,8 +509,8 @@ retry_wlocked:
 		if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') {
 			dotdothits++;
 			if (dvp->v_cache_dd == NULL) {
-				SDT_PROBE(vfs, namecache, lookup, miss, dvp,
-				    "..", NULL, 0, 0);
+				SDT_PROBE3(vfs, namecache, lookup, miss, dvp,
+				    "..", NULL);
 				goto unlock;
 			}
 			if ((cnp->cn_flags & MAKEENTRY) == 0) {
@@ -533,8 +532,8 @@ retry_wlocked:
 				goto negative_success;
 			CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
 			    dvp, cnp->cn_nameptr, *vpp);
-			SDT_PROBE(vfs, namecache, lookup, hit, dvp, "..",
-			    *vpp, 0, 0);
+			SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..",
+			    *vpp);
 			cache_out_ts(ncp, tsp, ticksp);
 			if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) ==
 			    NCF_DTS && tsp != NULL)
@@ -555,8 +554,8 @@ retry_wlocked:
 
 	/* We failed to find an entry */
 	if (ncp == NULL) {
-		SDT_PROBE(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr,
+		    NULL);
 		if ((cnp->cn_flags & MAKEENTRY) == 0) {
 			nummisszap++;
 		} else {
@@ -584,8 +583,8 @@ retry_wlocked:
 		*vpp = ncp->nc_vp;
 		CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p",
 		    dvp, cnp->cn_nameptr, *vpp, ncp);
-		SDT_PROBE(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp),
-		    *vpp, 0, 0);
+		SDT_PROBE3(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp),
+		    *vpp);
 		cache_out_ts(ncp, tsp, ticksp);
 		goto success;
 	}
@@ -616,8 +615,8 @@ negative_success:
 	nchstats.ncs_neghits++;
 	if (ncp->nc_flag & NCF_WHITE)
 		cnp->cn_flags |= ISWHITEOUT;
-	SDT_PROBE(vfs, namecache, lookup, hit__negative, dvp, nc_get_name(ncp),
-	    0, 0, 0);
+	SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp,
+	    nc_get_name(ncp));
 	cache_out_ts(ncp, tsp, ticksp);
 	CACHE_WUNLOCK();
 	return (ENOENT);
@@ -770,8 +769,7 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp
 				return;
 			}
 			dvp->v_cache_dd = NULL;
-			SDT_PROBE(vfs, namecache, enter, done, dvp, "..", vp,
-			    0, 0);
+			SDT_PROBE3(vfs, namecache, enter, done, dvp, "..", vp);
 			CACHE_WUNLOCK();
 			flag = NCF_ISDOTDOT;
 		}
@@ -891,12 +889,12 @@ cache_enter_time(dvp, vp, cnp, tsp, dtsp
 	 */
 	if (vp) {
 		TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst);
-		SDT_PROBE(vfs, namecache, enter, done, dvp, nc_get_name(ncp),
-		    vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp),
+		    vp);
 	} else {
 		TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
-		SDT_PROBE(vfs, namecache, enter_negative, done, dvp,
-		    nc_get_name(ncp), 0, 0, 0);
+		SDT_PROBE2(vfs, namecache, enter_negative, done, dvp,
+		    nc_get_name(ncp));
 	}
 	if (numneg * ncnegfactor > numcache) {
 		ncp = TAILQ_FIRST(&ncneg);
@@ -985,7 +983,7 @@ cache_purge(vp)
 {
 
 	CTR1(KTR_VFS, "cache_purge(%p)", vp);
-	SDT_PROBE(vfs, namecache, purge, done, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purge, done, vp);
 	CACHE_WLOCK();
 	while (!LIST_EMPTY(&vp->v_cache_src))
 		cache_zap(LIST_FIRST(&vp->v_cache_src));
@@ -1010,7 +1008,7 @@ cache_purge_negative(vp)
 	struct namecache *cp, *ncp;
 
 	CTR1(KTR_VFS, "cache_purge_negative(%p)", vp);
-	SDT_PROBE(vfs, namecache, purge_negative, done, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purge_negative, done, vp);
 	CACHE_WLOCK();
 	LIST_FOREACH_SAFE(cp, &vp->v_cache_src, nc_src, ncp) {
 		if (cp->nc_vp == NULL)
@@ -1030,7 +1028,7 @@ cache_purgevfs(mp)
 	struct namecache *ncp, *nnp;
 
 	/* Scan hash tables for applicable entries */
-	SDT_PROBE(vfs, namecache, purgevfs, done, mp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, purgevfs, done, mp);
 	CACHE_WLOCK();
 	for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) {
 		LIST_FOREACH_SAFE(ncp, ncpp, nc_hash, nnp) {
@@ -1252,14 +1250,14 @@ vn_vptocnp_locked(struct vnode **vp, str
 			vrele(*vp);
 			numfullpathfail4++;
 			error = ENOMEM;
-			SDT_PROBE(vfs, namecache, fullpath, return, error,
-			    vp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, error,
+			    vp, NULL);
 			return (error);
 		}
 		*buflen -= ncp->nc_nlen;
 		memcpy(buf + *buflen, nc_get_name(ncp), ncp->nc_nlen);
-		SDT_PROBE(vfs, namecache, fullpath, hit, ncp->nc_dvp,
-		    nc_get_name(ncp), vp, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, hit, ncp->nc_dvp,
+		    nc_get_name(ncp), vp);
 		dvp = *vp;
 		*vp = ncp->nc_dvp;
 		vref(*vp);
@@ -1268,7 +1266,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 		CACHE_RLOCK();
 		return (0);
 	}
-	SDT_PROBE(vfs, namecache, fullpath, miss, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, fullpath, miss, vp);
 
 	CACHE_RUNLOCK();
 	vn_lock(*vp, LK_SHARED | LK_RETRY);
@@ -1276,8 +1274,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 	vput(*vp);
 	if (error) {
 		numfullpathfail2++;
-		SDT_PROBE(vfs, namecache, fullpath, return,  error, vp,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, return,  error, vp, NULL);
 		return (error);
 	}
 
@@ -1288,8 +1285,7 @@ vn_vptocnp_locked(struct vnode **vp, str
 		CACHE_RUNLOCK();
 		vrele(dvp);
 		error = ENOENT;
-		SDT_PROBE(vfs, namecache, fullpath, return, error, vp,
-		    NULL, 0, 0);
+		SDT_PROBE3(vfs, namecache, fullpath, return, error, vp, NULL);
 		return (error);
 	}
 	/*
@@ -1317,7 +1313,7 @@ vn_fullpath1(struct thread *td, struct v
 	error = 0;
 	slash_prefixed = 0;
 
-	SDT_PROBE(vfs, namecache, fullpath, entry, vp, 0, 0, 0, 0);
+	SDT_PROBE1(vfs, namecache, fullpath, entry, vp);
 	numfullpathcalls++;
 	vref(vp);
 	CACHE_RLOCK();
@@ -1339,8 +1335,8 @@ vn_fullpath1(struct thread *td, struct v
 				CACHE_RUNLOCK();
 				vrele(vp);
 				error = ENOENT;
-				SDT_PROBE(vfs, namecache, fullpath, return,
-				    error, vp, NULL, 0, 0);
+				SDT_PROBE3(vfs, namecache, fullpath, return,
+				    error, vp, NULL);
 				break;
 			}
 			vp1 = vp->v_mount->mnt_vnodecovered;
@@ -1356,8 +1352,8 @@ vn_fullpath1(struct thread *td, struct v
 			vrele(vp);
 			numfullpathfail1++;
 			error = ENOTDIR;
-			SDT_PROBE(vfs, namecache, fullpath, return,
-			    error, vp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return,
+			    error, vp, NULL);
 			break;
 		}
 		error = vn_vptocnp_locked(&vp, td->td_ucred, buf, &buflen);
@@ -1367,8 +1363,8 @@ vn_fullpath1(struct thread *td, struct v
 			CACHE_RUNLOCK();
 			vrele(vp);
 			error = ENOMEM;
-			SDT_PROBE(vfs, namecache, fullpath, return, error,
-			    startvp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, error,
+			    startvp, NULL);
 			break;
 		}
 		buf[--buflen] = '/';
@@ -1381,8 +1377,8 @@ vn_fullpath1(struct thread *td, struct v
 			CACHE_RUNLOCK();
 			vrele(vp);
 			numfullpathfail4++;
-			SDT_PROBE(vfs, namecache, fullpath, return, ENOMEM,
-			    startvp, NULL, 0, 0);
+			SDT_PROBE3(vfs, namecache, fullpath, return, ENOMEM,
+			    startvp, NULL);
 			return (ENOMEM);
 		}
 		buf[--buflen] = '/';
@@ -1391,8 +1387,7 @@ vn_fullpath1(struct thread *td, struct v
 	CACHE_RUNLOCK();
 	vrele(vp);
 
-	SDT_PROBE(vfs, namecache, fullpath, return, 0, startvp, buf + buflen,
-	    0, 0);
+	SDT_PROBE3(vfs, namecache, fullpath, return, 0, startvp, buf + buflen);
 	*retbuf = buf + buflen;
 	return (0);
 }

Modified: stable/10/sys/kern/vfs_lookup.c
==============================================================================
--- stable/10/sys/kern/vfs_lookup.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/vfs_lookup.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -273,8 +273,8 @@ namei(struct nameidata *ndp)
 		if (ndp->ni_startdir != NULL)
 			vrele(ndp->ni_startdir);
 	}
-	SDT_PROBE(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf,
-	    cnp->cn_flags, 0, 0);
+	SDT_PROBE3(vfs, namei, lookup, entry, dp, cnp->cn_pnbuf,
+	    cnp->cn_flags);
 	for (;;) {
 		/*
 		 * Check if root directory should replace current directory.
@@ -302,8 +302,7 @@ namei(struct nameidata *ndp)
 		error = lookup(ndp);
 		if (error) {
 			namei_cleanup_cnp(cnp);
-			SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0,
-			    0, 0);
+			SDT_PROBE2(vfs, namei, lookup, return, error, NULL);
 			return (error);
 		}
 		/*
@@ -315,8 +314,7 @@ namei(struct nameidata *ndp)
 			} else
 				cnp->cn_flags |= HASBUF;
 
-			SDT_PROBE(vfs, namei, lookup, return, 0, ndp->ni_vp,
-			    0, 0, 0);
+			SDT_PROBE2(vfs, namei, lookup, return, 0, ndp->ni_vp);
 			return (0);
 		}
 		if (ndp->ni_loopcnt++ >= MAXSYMLINKS) {
@@ -377,7 +375,7 @@ namei(struct nameidata *ndp)
 	vput(ndp->ni_vp);
 	ndp->ni_vp = NULL;
 	vrele(ndp->ni_dvp);
-	SDT_PROBE(vfs, namei, lookup, return, error, NULL, 0, 0, 0);
+	SDT_PROBE2(vfs, namei, lookup, return, error, NULL);
 	return (error);
 }
 

Modified: stable/10/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/10/sys/kern/vfs_syscalls.c	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/kern/vfs_syscalls.c	Fri Oct 23 07:40:43 2015	(r289798)
@@ -2299,9 +2299,9 @@ kern_statat_vnhook(struct thread *td, in
 		return (error);
 	error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td);
 	if (error == 0) {
-		SDT_PROBE(vfs, , stat, mode, path, sb.st_mode, 0, 0, 0);
+		SDT_PROBE2(vfs, , stat, mode, path, sb.st_mode);
 		if (S_ISREG(sb.st_mode))
-			SDT_PROBE(vfs, , stat, reg, path, pathseg, 0, 0, 0);
+			SDT_PROBE2(vfs, , stat, reg, path, pathseg);
 		if (__predict_false(hook != NULL))
 			hook(nd.ni_vp, &sb);
 	}

Modified: stable/10/sys/tools/vnode_if.awk
==============================================================================
--- stable/10/sys/tools/vnode_if.awk	Fri Oct 23 07:38:34 2015	(r289797)
+++ stable/10/sys/tools/vnode_if.awk	Fri Oct 23 07:40:43 2015	(r289798)
@@ -361,7 +361,7 @@ while ((getline < srcfile) > 0) {
 		printc("\t    vop->"name" == NULL && vop->vop_bypass == NULL)")
 		printc("\t\tvop = vop->vop_default;")
 		printc("\tVNASSERT(vop != NULL, a->a_" args[0]", (\"No "name"(%p, %p)\", a->a_" args[0]", a));")
-		printc("\tSDT_PROBE(vfs, vop, " name ", entry, a->a_" args[0] ", a, 0, 0, 0);\n");
+		printc("\tSDT_PROBE2(vfs, vop, " name ", entry, a->a_" args[0] ", a);\n");
 		for (i = 0; i < numargs; ++i)
 			add_debug_code(name, args[i], "Entry", "\t");
 		printc("\tKTR_START" ctrstr);
@@ -372,7 +372,7 @@ while ((getline < srcfile) > 0) {
 		printc("\telse")
 		printc("\t\trc = vop->vop_bypass(&a->a_gen);")
 		printc("\tVFS_EPILOGUE(a->a_" args[0]"->v_mount);")
-		printc("\tSDT_PROBE(vfs, vop, " name ", return, a->a_" args[0] ", a, rc, 0, 0);\n");
+		printc("\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);\n");
 		printc("\tif (rc == 0) {");
 		for (i = 0; i < numargs; ++i)
 			add_debug_code(name, args[i], "OK", "\t\t");


More information about the svn-src-stable-10 mailing list