save some bytes by using more concise SDT_PROBE<n> instead of SDT_PROBE
SDT_PROBE requires 5 parameters whereas SDT_PROBE<n> requires n parameters where n is typically smaller than 5. Perhaps SDT_PROBE should be made a private implementation detail. MFC after: 20 days
This commit is contained in:
parent
b27480c68d
commit
2f2f522b5d
@ -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)
|
||||
|
@ -418,7 +418,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) {
|
||||
@ -846,7 +846,7 @@ do_execve(td, args, mac_p)
|
||||
|
||||
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:
|
||||
@ -918,7 +918,7 @@ do_execve(td, args, mac_p)
|
||||
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
|
||||
|
@ -569,7 +569,7 @@ exit1(struct thread *td, int rval, int signo)
|
||||
reason = CLD_DUMPED;
|
||||
else if (WIFSIGNALED(signo))
|
||||
reason = CLD_KILLED;
|
||||
SDT_PROBE(proc, kernel, , exit, reason, 0, 0, 0, 0);
|
||||
SDT_PROBE1(proc, kernel, , exit, reason);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -753,7 +753,7 @@ do_fork(struct thread *td, int flags, struct proc *p2, struct thread *td2,
|
||||
* 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.
|
||||
|
@ -181,9 +181,9 @@ proc_ctor(void *mem, int size, void *arg, int flags)
|
||||
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];
|
||||
mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK | MTX_NEW);
|
||||
mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN | MTX_NEW);
|
||||
@ -236,7 +236,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);
|
||||
}
|
||||
|
||||
|
@ -445,7 +445,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"));
|
||||
|
||||
@ -460,7 +460,7 @@ racct_destroy_locked(struct racct **racctp)
|
||||
|
||||
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"));
|
||||
@ -538,7 +538,7 @@ racct_add_locked(struct proc *p, int resource, uint64_t amount)
|
||||
|
||||
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.
|
||||
@ -548,8 +548,8 @@ racct_add_locked(struct proc *p, int resource, uint64_t amount)
|
||||
#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
|
||||
@ -584,8 +584,7 @@ racct_add_cred_locked(struct ucred *cred, int resource, uint64_t amount)
|
||||
|
||||
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)
|
||||
@ -623,7 +622,7 @@ racct_add_force(struct proc *p, int resource, uint64_t amount)
|
||||
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.
|
||||
@ -647,7 +646,7 @@ racct_set_locked(struct proc *p, int resource, uint64_t amount)
|
||||
|
||||
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.
|
||||
@ -679,8 +678,8 @@ racct_set_locked(struct proc *p, int resource, uint64_t amount)
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -723,7 +722,7 @@ racct_set_force_locked(struct proc *p, int resource, uint64_t amount)
|
||||
|
||||
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.
|
||||
@ -834,7 +833,7 @@ racct_sub(struct proc *p, int resource, uint64_t amount)
|
||||
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.
|
||||
@ -861,8 +860,7 @@ racct_sub_cred_locked(struct ucred *cred, int resource, uint64_t amount)
|
||||
|
||||
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),
|
||||
|
@ -1308,7 +1308,7 @@ kern_sigtimedwait(struct thread *td, sigset_t waitset, ksiginfo_t *ksi,
|
||||
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);
|
||||
@ -2121,7 +2121,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi)
|
||||
} 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,
|
||||
@ -2132,7 +2132,7 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi)
|
||||
*/
|
||||
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))
|
||||
|
@ -718,9 +718,9 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc,
|
||||
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();
|
||||
|
@ -419,11 +419,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;
|
||||
@ -498,8 +498,7 @@ cache_lookup(dvp, vpp, cnp, tsp, ticksp)
|
||||
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)
|
||||
@ -509,8 +508,8 @@ cache_lookup(dvp, vpp, cnp, tsp, ticksp)
|
||||
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) {
|
||||
@ -532,8 +531,8 @@ cache_lookup(dvp, vpp, cnp, tsp, ticksp)
|
||||
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)
|
||||
@ -554,8 +553,8 @@ cache_lookup(dvp, vpp, cnp, tsp, ticksp)
|
||||
|
||||
/* 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 {
|
||||
@ -583,8 +582,8 @@ cache_lookup(dvp, vpp, cnp, tsp, ticksp)
|
||||
*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;
|
||||
}
|
||||
@ -615,8 +614,8 @@ cache_lookup(dvp, vpp, cnp, tsp, ticksp)
|
||||
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);
|
||||
@ -769,8 +768,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;
|
||||
}
|
||||
@ -890,12 +888,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);
|
||||
@ -984,7 +982,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));
|
||||
@ -1009,7 +1007,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)
|
||||
@ -1029,7 +1027,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) {
|
||||
@ -1253,14 +1251,14 @@ vn_vptocnp_locked(struct vnode **vp, struct ucred *cred, char *buf,
|
||||
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);
|
||||
@ -1269,7 +1267,7 @@ vn_vptocnp_locked(struct vnode **vp, struct ucred *cred, char *buf,
|
||||
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);
|
||||
@ -1277,8 +1275,7 @@ vn_vptocnp_locked(struct vnode **vp, struct ucred *cred, char *buf,
|
||||
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);
|
||||
}
|
||||
|
||||
@ -1289,8 +1286,7 @@ vn_vptocnp_locked(struct vnode **vp, struct ucred *cred, char *buf,
|
||||
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);
|
||||
}
|
||||
/*
|
||||
@ -1318,7 +1314,7 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
|
||||
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();
|
||||
@ -1340,8 +1336,8 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
|
||||
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;
|
||||
@ -1357,8 +1353,8 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
|
||||
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);
|
||||
@ -1368,8 +1364,8 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
|
||||
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] = '/';
|
||||
@ -1382,8 +1378,8 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
|
||||
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] = '/';
|
||||
@ -1392,8 +1388,7 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir,
|
||||
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);
|
||||
}
|
||||
|
@ -299,16 +299,15 @@ namei(struct nameidata *ndp)
|
||||
namei_cleanup_cnp(cnp);
|
||||
return (error);
|
||||
}
|
||||
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 (;;) {
|
||||
ndp->ni_startdir = dp;
|
||||
error = lookup(ndp);
|
||||
if (error != 0) {
|
||||
vrele(ndp->ni_rootdir);
|
||||
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);
|
||||
}
|
||||
/*
|
||||
@ -321,8 +320,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) {
|
||||
@ -397,7 +395,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);
|
||||
}
|
||||
|
||||
|
@ -2160,9 +2160,9 @@ kern_statat(struct thread *td, int flag, int fd, char *path,
|
||||
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);
|
||||
}
|
||||
|
@ -359,7 +359,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);
|
||||
@ -370,7 +370,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");
|
||||
|
Loading…
Reference in New Issue
Block a user