Catch up to changes in ktrace API.
This commit is contained in:
parent
ea3fc8e4cd
commit
60a9bb197d
@ -227,7 +227,7 @@ svr4_sendit(td, s, mp, flags)
|
||||
if (error == 0) {
|
||||
ktruio.uio_iov = ktriov;
|
||||
ktruio.uio_resid = td->td_retval[0];
|
||||
ktrgenio(td->td_proc->p_tracep, s, UIO_WRITE, &ktruio, error);
|
||||
ktrgenio(s, UIO_WRITE, &ktruio, error);
|
||||
}
|
||||
FREE(ktriov, M_TEMP);
|
||||
}
|
||||
@ -299,7 +299,7 @@ svr4_recvit(td, s, mp, namelenp)
|
||||
if (error == 0) {
|
||||
ktruio.uio_iov = ktriov;
|
||||
ktruio.uio_resid = len - auio.uio_resid;
|
||||
ktrgenio(td->td_proc->p_tracep, s, UIO_READ, &ktruio, error);
|
||||
ktrgenio(s, UIO_READ, &ktruio, error);
|
||||
}
|
||||
FREE(ktriov, M_TEMP);
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ dofileread(td, fp, fd, buf, nbyte, offset, flags)
|
||||
/*
|
||||
* if tracing, save a copy of iovec
|
||||
*/
|
||||
if (KTRPOINT(td->td_proc, KTR_GENIO)) {
|
||||
if (KTRPOINT(td, KTR_GENIO)) {
|
||||
ktriov = aiov;
|
||||
ktruio = auio;
|
||||
didktr = 1;
|
||||
@ -202,7 +202,7 @@ dofileread(td, fp, fd, buf, nbyte, offset, flags)
|
||||
if (didktr && error == 0) {
|
||||
ktruio.uio_iov = &ktriov;
|
||||
ktruio.uio_resid = cnt;
|
||||
ktrgenio(td->td_proc->p_tracep, fd, UIO_READ, &ktruio, error);
|
||||
ktrgenio(fd, UIO_READ, &ktruio, error);
|
||||
}
|
||||
#endif
|
||||
td->td_retval[0] = cnt;
|
||||
@ -275,7 +275,7 @@ readv(td, uap)
|
||||
/*
|
||||
* if tracing, save a copy of iovec
|
||||
*/
|
||||
if (KTRPOINT(td->td_proc, KTR_GENIO)) {
|
||||
if (KTRPOINT(td, KTR_GENIO)) {
|
||||
MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
|
||||
bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen);
|
||||
ktruio = auio;
|
||||
@ -293,8 +293,7 @@ readv(td, uap)
|
||||
if (error == 0) {
|
||||
ktruio.uio_iov = ktriov;
|
||||
ktruio.uio_resid = cnt;
|
||||
ktrgenio(td->td_proc->p_tracep, uap->fd, UIO_READ, &ktruio,
|
||||
error);
|
||||
ktrgenio(uap->fd, UIO_READ, &ktruio, error);
|
||||
}
|
||||
FREE(ktriov, M_TEMP);
|
||||
}
|
||||
@ -408,7 +407,7 @@ dofilewrite(td, fp, fd, buf, nbyte, offset, flags)
|
||||
/*
|
||||
* if tracing, save a copy of iovec and uio
|
||||
*/
|
||||
if (KTRPOINT(td->td_proc, KTR_GENIO)) {
|
||||
if (KTRPOINT(td, KTR_GENIO)) {
|
||||
ktriov = aiov;
|
||||
ktruio = auio;
|
||||
didktr = 1;
|
||||
@ -432,7 +431,7 @@ dofilewrite(td, fp, fd, buf, nbyte, offset, flags)
|
||||
if (didktr && error == 0) {
|
||||
ktruio.uio_iov = &ktriov;
|
||||
ktruio.uio_resid = cnt;
|
||||
ktrgenio(td->td_proc->p_tracep, fd, UIO_WRITE, &ktruio, error);
|
||||
ktrgenio(fd, UIO_WRITE, &ktruio, error);
|
||||
}
|
||||
#endif
|
||||
td->td_retval[0] = cnt;
|
||||
@ -509,7 +508,7 @@ writev(td, uap)
|
||||
/*
|
||||
* if tracing, save a copy of iovec and uio
|
||||
*/
|
||||
if (KTRPOINT(td->td_proc, KTR_GENIO)) {
|
||||
if (KTRPOINT(td, KTR_GENIO)) {
|
||||
MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
|
||||
bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen);
|
||||
ktruio = auio;
|
||||
@ -534,8 +533,7 @@ writev(td, uap)
|
||||
if (error == 0) {
|
||||
ktruio.uio_iov = ktriov;
|
||||
ktruio.uio_resid = cnt;
|
||||
ktrgenio(td->td_proc->p_tracep, uap->fd, UIO_WRITE, &ktruio,
|
||||
error);
|
||||
ktrgenio(uap->fd, UIO_WRITE, &ktruio, error);
|
||||
}
|
||||
FREE(ktriov, M_TEMP);
|
||||
}
|
||||
|
@ -578,6 +578,7 @@ sendit(td, s, mp, flags)
|
||||
#ifdef KTRACE
|
||||
struct iovec *ktriov = NULL;
|
||||
struct uio ktruio;
|
||||
int iovlen;
|
||||
#endif
|
||||
|
||||
if ((error = fgetsock(td, s, &so, NULL)) != 0)
|
||||
@ -634,9 +635,8 @@ sendit(td, s, mp, flags)
|
||||
control = 0;
|
||||
}
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(td->td_proc, KTR_GENIO)) {
|
||||
int iovlen = auio.uio_iovcnt * sizeof (struct iovec);
|
||||
|
||||
if (KTRPOINT(td, KTR_GENIO)) {
|
||||
iovlen = auio.uio_iovcnt * sizeof (struct iovec);
|
||||
MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
|
||||
bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen);
|
||||
ktruio = auio;
|
||||
@ -662,7 +662,7 @@ sendit(td, s, mp, flags)
|
||||
if (error == 0) {
|
||||
ktruio.uio_iov = ktriov;
|
||||
ktruio.uio_resid = td->td_retval[0];
|
||||
ktrgenio(td->td_proc->p_tracep, s, UIO_WRITE, &ktruio, error);
|
||||
ktrgenio(s, UIO_WRITE, &ktruio, error);
|
||||
}
|
||||
FREE(ktriov, M_TEMP);
|
||||
}
|
||||
@ -854,6 +854,7 @@ recvit(td, s, mp, namelenp)
|
||||
#ifdef KTRACE
|
||||
struct iovec *ktriov = NULL;
|
||||
struct uio ktruio;
|
||||
int iovlen;
|
||||
#endif
|
||||
|
||||
if ((error = fgetsock(td, s, &so, NULL)) != 0)
|
||||
@ -873,9 +874,8 @@ recvit(td, s, mp, namelenp)
|
||||
}
|
||||
}
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(td->td_proc, KTR_GENIO)) {
|
||||
int iovlen = auio.uio_iovcnt * sizeof (struct iovec);
|
||||
|
||||
if (KTRPOINT(td, KTR_GENIO)) {
|
||||
iovlen = auio.uio_iovcnt * sizeof (struct iovec);
|
||||
MALLOC(ktriov, struct iovec *, iovlen, M_TEMP, M_WAITOK);
|
||||
bcopy((caddr_t)auio.uio_iov, (caddr_t)ktriov, iovlen);
|
||||
ktruio = auio;
|
||||
@ -895,7 +895,7 @@ recvit(td, s, mp, namelenp)
|
||||
if (error == 0) {
|
||||
ktruio.uio_iov = ktriov;
|
||||
ktruio.uio_resid = len - auio.uio_resid;
|
||||
ktrgenio(td->td_proc->p_tracep, s, UIO_READ, &ktruio, error);
|
||||
ktrgenio(s, UIO_READ, &ktruio, error);
|
||||
}
|
||||
FREE(ktriov, M_TEMP);
|
||||
}
|
||||
|
@ -139,8 +139,11 @@ namei(ndp)
|
||||
}
|
||||
ndp->ni_loopcnt = 0;
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(p, KTR_NAMEI))
|
||||
ktrnamei(p->p_tracep, cnp->cn_pnbuf);
|
||||
if (KTRPOINT(td, KTR_NAMEI)) {
|
||||
KASSERT(cnp->cn_thread == curthread,
|
||||
("namei not using curthread"));
|
||||
ktrnamei(cnp->cn_pnbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user