git: 5e8caee259d0 - main - linux: remove redundant SDT tracepoints
Edward Tomasz Napierala
trasz at FreeBSD.org
Wed May 5 13:27:14 UTC 2021
The branch main has been updated by trasz:
URL: https://cgit.FreeBSD.org/src/commit/?id=5e8caee259d0cc73301b8fc60c8fb388e7f745af
commit 5e8caee259d0cc73301b8fc60c8fb388e7f745af
Author: Edward Tomasz Napierala <trasz at FreeBSD.org>
AuthorDate: 2021-05-05 12:58:54 +0000
Commit: Edward Tomasz Napierala <trasz at FreeBSD.org>
CommitDate: 2021-05-05 12:59:00 +0000
linux: remove redundant SDT tracepoints
Remove all the 'entry' and 'return' probes; they clutter up the source
and are redundant to FBT.
Reviewed By: dchagin
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D30040
---
sys/compat/linux/linux_futex.c | 189 +++-------------------------------------
sys/compat/linux/linux_sysctl.c | 21 +----
sys/compat/linux/linux_time.c | 71 +--------------
sys/compat/linux/linux_uid16.c | 90 +------------------
sys/compat/linux/linux_util.h | 5 --
5 files changed, 18 insertions(+), 358 deletions(-)
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c
index 43ac318d2b51..da1a91916869 100644
--- a/sys/compat/linux/linux_futex.c
+++ b/sys/compat/linux/linux_futex.c
@@ -91,58 +91,32 @@ LIN_SDT_PROBE_DEFINE1(futex, futex, destroy, "struct sx *");
/**
* DTrace probes in this module.
*/
-LIN_SDT_PROBE_DEFINE2(futex, futex_put, entry, "struct futex *",
- "struct waiting_proc *");
LIN_SDT_PROBE_DEFINE3(futex, futex_put, destroy, "uint32_t *", "uint32_t",
"int");
LIN_SDT_PROBE_DEFINE3(futex, futex_put, unlock, "uint32_t *", "uint32_t",
"int");
-LIN_SDT_PROBE_DEFINE0(futex, futex_put, return);
-LIN_SDT_PROBE_DEFINE3(futex, futex_get0, entry, "uint32_t *", "struct futex **",
- "uint32_t");
LIN_SDT_PROBE_DEFINE1(futex, futex_get0, umtx_key_get_error, "int");
LIN_SDT_PROBE_DEFINE3(futex, futex_get0, shared, "uint32_t *", "uint32_t",
"int");
LIN_SDT_PROBE_DEFINE1(futex, futex_get0, null, "uint32_t *");
LIN_SDT_PROBE_DEFINE3(futex, futex_get0, new, "uint32_t *", "uint32_t", "int");
-LIN_SDT_PROBE_DEFINE1(futex, futex_get0, return, "int");
-LIN_SDT_PROBE_DEFINE3(futex, futex_get, entry, "uint32_t *",
- "struct waiting_proc **", "struct futex **");
LIN_SDT_PROBE_DEFINE0(futex, futex_get, error);
-LIN_SDT_PROBE_DEFINE1(futex, futex_get, return, "int");
-LIN_SDT_PROBE_DEFINE3(futex, futex_sleep, entry, "struct futex *",
- "struct waiting_proc **", "struct timespec *");
LIN_SDT_PROBE_DEFINE5(futex, futex_sleep, requeue_error, "int", "uint32_t *",
"struct waiting_proc *", "uint32_t *", "uint32_t");
LIN_SDT_PROBE_DEFINE3(futex, futex_sleep, sleep_error, "int", "uint32_t *",
"struct waiting_proc *");
-LIN_SDT_PROBE_DEFINE1(futex, futex_sleep, return, "int");
-LIN_SDT_PROBE_DEFINE3(futex, futex_wake, entry, "struct futex *", "int",
- "uint32_t");
LIN_SDT_PROBE_DEFINE3(futex, futex_wake, iterate, "uint32_t",
"struct waiting_proc *", "uint32_t");
LIN_SDT_PROBE_DEFINE1(futex, futex_wake, wakeup, "struct waiting_proc *");
-LIN_SDT_PROBE_DEFINE1(futex, futex_wake, return, "int");
-LIN_SDT_PROBE_DEFINE4(futex, futex_requeue, entry, "struct futex *", "int",
- "struct futex *", "int");
LIN_SDT_PROBE_DEFINE1(futex, futex_requeue, wakeup, "struct waiting_proc *");
LIN_SDT_PROBE_DEFINE3(futex, futex_requeue, requeue, "uint32_t *",
"struct waiting_proc *", "uint32_t");
-LIN_SDT_PROBE_DEFINE1(futex, futex_requeue, return, "int");
-LIN_SDT_PROBE_DEFINE4(futex, futex_wait, entry, "struct futex *",
- "struct waiting_proc **", "struct timespec *", "uint32_t");
LIN_SDT_PROBE_DEFINE1(futex, futex_wait, sleep_error, "int");
-LIN_SDT_PROBE_DEFINE1(futex, futex_wait, return, "int");
-LIN_SDT_PROBE_DEFINE3(futex, futex_atomic_op, entry, "struct thread *",
- "int", "uint32_t");
LIN_SDT_PROBE_DEFINE4(futex, futex_atomic_op, decoded_op, "int", "int", "int",
"int");
LIN_SDT_PROBE_DEFINE0(futex, futex_atomic_op, missing_access_check);
LIN_SDT_PROBE_DEFINE1(futex, futex_atomic_op, unimplemented_op, "int");
LIN_SDT_PROBE_DEFINE1(futex, futex_atomic_op, unimplemented_cmp, "int");
-LIN_SDT_PROBE_DEFINE1(futex, futex_atomic_op, return, "int");
-LIN_SDT_PROBE_DEFINE2(futex, linux_sys_futex, entry, "struct thread *",
- "struct linux_sys_futex_args *");
LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_clockswitch);
LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, copyin_error, "int");
LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, invalid_cmp_requeue_use);
@@ -166,28 +140,11 @@ LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, deprecated_requeue);
LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_wait_requeue_pi);
LIN_SDT_PROBE_DEFINE0(futex, linux_sys_futex, unimplemented_cmp_requeue_pi);
LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, unknown_operation, "int");
-LIN_SDT_PROBE_DEFINE1(futex, linux_sys_futex, return, "int");
-LIN_SDT_PROBE_DEFINE2(futex, linux_set_robust_list, entry, "struct thread *",
- "struct linux_set_robust_list_args *");
LIN_SDT_PROBE_DEFINE0(futex, linux_set_robust_list, size_error);
-LIN_SDT_PROBE_DEFINE1(futex, linux_set_robust_list, return, "int");
-LIN_SDT_PROBE_DEFINE2(futex, linux_get_robust_list, entry, "struct thread *",
- "struct linux_get_robust_list_args *");
LIN_SDT_PROBE_DEFINE1(futex, linux_get_robust_list, copyout_error, "int");
-LIN_SDT_PROBE_DEFINE1(futex, linux_get_robust_list, return, "int");
-LIN_SDT_PROBE_DEFINE3(futex, handle_futex_death, entry,
- "struct linux_emuldata *", "uint32_t *", "unsigned int");
LIN_SDT_PROBE_DEFINE1(futex, handle_futex_death, copyin_error, "int");
-LIN_SDT_PROBE_DEFINE1(futex, handle_futex_death, return, "int");
-LIN_SDT_PROBE_DEFINE3(futex, fetch_robust_entry, entry,
- "struct linux_robust_list **", "struct linux_robust_list **",
- "unsigned int *");
LIN_SDT_PROBE_DEFINE1(futex, fetch_robust_entry, copyin_error, "int");
-LIN_SDT_PROBE_DEFINE1(futex, fetch_robust_entry, return, "int");
-LIN_SDT_PROBE_DEFINE2(futex, release_futexes, entry, "struct thread *",
- "struct linux_emuldata *");
LIN_SDT_PROBE_DEFINE1(futex, release_futexes, copyin_error, "int");
-LIN_SDT_PROBE_DEFINE0(futex, release_futexes, return);
struct futex;
@@ -298,7 +255,6 @@ futex_copyin_timeout(int op, struct l_timespec *luts, int clockrt,
static void
futex_put(struct futex *f, struct waiting_proc *wp)
{
- LIN_SDT_PROBE2(futex, futex_put, entry, f, wp);
if (wp != NULL) {
if ((wp->wp_flags & FUTEX_WP_REMOVED) == 0)
@@ -320,8 +276,6 @@ futex_put(struct futex *f, struct waiting_proc *wp)
umtx_key_release(&f->f_key);
FUTEX_DESTROY(f);
free(f, M_FUTEX);
-
- LIN_SDT_PROBE0(futex, futex_put, return);
return;
}
@@ -332,8 +286,6 @@ futex_put(struct futex *f, struct waiting_proc *wp)
if (FUTEX_LOCKED(f))
futex_unlock(f);
FUTEXES_UNLOCK;
-
- LIN_SDT_PROBE0(futex, futex_put, return);
}
static int
@@ -343,15 +295,12 @@ futex_get0(uint32_t *uaddr, struct futex **newf, uint32_t flags)
struct umtx_key key;
int error;
- LIN_SDT_PROBE3(futex, futex_get0, entry, uaddr, newf, flags);
-
*newf = tmpf = NULL;
error = umtx_key_get(uaddr, TYPE_FUTEX, (flags & FUTEX_SHARED) ?
AUTO_SHARE : THREAD_SHARE, &key);
if (error) {
LIN_SDT_PROBE1(futex, futex_get0, umtx_key_get_error, error);
- LIN_SDT_PROBE1(futex, futex_get0, return, error);
return (error);
}
retry:
@@ -368,8 +317,6 @@ retry:
FUTEXES_UNLOCK;
umtx_key_release(&key);
- LIN_SDT_PROBE1(futex, futex_get0, return,
- EINVAL);
return (EINVAL);
}
@@ -389,7 +336,6 @@ retry:
LINUX_CTR3(sys_futex, "futex_get uaddr %p ref %d shared %d",
uaddr, f->f_refcount, f->f_key.shared);
- LIN_SDT_PROBE1(futex, futex_get0, return, 0);
return (0);
}
}
@@ -400,7 +346,6 @@ retry:
LIN_SDT_PROBE1(futex, futex_get0, null, uaddr);
LINUX_CTR1(sys_futex, "futex_get uaddr %p null", uaddr);
- LIN_SDT_PROBE1(futex, futex_get0, return, 0);
return (0);
}
@@ -432,7 +377,6 @@ retry:
uaddr, tmpf->f_refcount, tmpf->f_key.shared);
*newf = tmpf;
- LIN_SDT_PROBE1(futex, futex_get0, return, 0);
return (0);
}
@@ -442,8 +386,6 @@ futex_get(uint32_t *uaddr, struct waiting_proc **wp, struct futex **f,
{
int error;
- LIN_SDT_PROBE3(futex, futex_get, entry, uaddr, wp, f);
-
if (flags & FUTEX_CREATE_WP) {
*wp = malloc(sizeof(struct waiting_proc), M_FUTEX_WP, M_WAITOK);
(*wp)->wp_flags = 0;
@@ -455,7 +397,6 @@ futex_get(uint32_t *uaddr, struct waiting_proc **wp, struct futex **f,
if (flags & FUTEX_CREATE_WP)
free(*wp, M_FUTEX_WP);
- LIN_SDT_PROBE1(futex, futex_get, return, error);
return (error);
}
if (flags & FUTEX_CREATE_WP) {
@@ -463,7 +404,6 @@ futex_get(uint32_t *uaddr, struct waiting_proc **wp, struct futex **f,
(*wp)->wp_futex = *f;
}
- LIN_SDT_PROBE1(futex, futex_get, return, error);
return (error);
}
@@ -512,7 +452,6 @@ futex_sleep(struct futex *f, struct waiting_proc *wp, struct timespec *ts)
sbt = 0;
prec = 0;
}
- LIN_SDT_PROBE3(futex, futex_sleep, entry, f, wp, sbt);
LINUX_CTR4(sys_futex, "futex_sleep enter uaddr %p wp %p timo %ld ref %d",
f->f_uaddr, wp, sbt, f->f_refcount);
@@ -544,7 +483,6 @@ futex_sleep(struct futex *f, struct waiting_proc *wp, struct timespec *ts)
futex_put(f, wp);
- LIN_SDT_PROBE1(futex, futex_sleep, return, error);
return (error);
}
@@ -554,12 +492,8 @@ futex_wake(struct futex *f, int n, uint32_t bitset)
struct waiting_proc *wp, *wpt;
int count = 0;
- LIN_SDT_PROBE3(futex, futex_wake, entry, f, n, bitset);
-
- if (bitset == 0) {
- LIN_SDT_PROBE1(futex, futex_wake, return, EINVAL);
+ if (bitset == 0)
return (EINVAL);
- }
FUTEX_ASSERT_LOCKED(f);
TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) {
@@ -582,7 +516,6 @@ futex_wake(struct futex *f, int n, uint32_t bitset)
break;
}
- LIN_SDT_PROBE1(futex, futex_wake, return, count);
return (count);
}
@@ -592,8 +525,6 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2)
struct waiting_proc *wp, *wpt;
int count = 0;
- LIN_SDT_PROBE4(futex, futex_requeue, entry, f, n, f2, n2);
-
FUTEX_ASSERT_LOCKED(f);
FUTEX_ASSERT_LOCKED(f2);
@@ -629,7 +560,6 @@ futex_requeue(struct futex *f, int n, struct futex *f2, int n2)
}
}
- LIN_SDT_PROBE1(futex, futex_requeue, return, count);
return (count);
}
@@ -639,10 +569,7 @@ futex_wait(struct futex *f, struct waiting_proc *wp, struct timespec *ts,
{
int error;
- LIN_SDT_PROBE4(futex, futex_wait, entry, f, wp, ts, bitset);
-
if (bitset == 0) {
- LIN_SDT_PROBE1(futex, futex_wait, return, EINVAL);
futex_put(f, wp);
return (EINVAL);
}
@@ -654,7 +581,6 @@ futex_wait(struct futex *f, struct waiting_proc *wp, struct timespec *ts,
if (error == EWOULDBLOCK)
error = ETIMEDOUT;
- LIN_SDT_PROBE1(futex, futex_wait, return, error);
return (error);
}
@@ -667,8 +593,6 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr)
int cmparg = (encoded_op << 20) >> 20;
int oldval = 0, ret;
- LIN_SDT_PROBE3(futex, futex_atomic_op, entry, td, encoded_op, uaddr);
-
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
oparg = 1 << oparg;
@@ -700,10 +624,8 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr)
break;
}
- if (ret) {
- LIN_SDT_PROBE1(futex, futex_atomic_op, return, ret);
+ if (ret)
return (ret);
- }
switch (cmp) {
case FUTEX_OP_CMP_EQ:
@@ -729,7 +651,6 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr)
ret = -ENOSYS;
}
- LIN_SDT_PROBE1(futex, futex_atomic_op, return, ret);
return (ret);
}
@@ -744,8 +665,6 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args)
int error, save;
uint32_t flags, val;
- LIN_SDT_PROBE2(futex, linux_sys_futex, entry, td, args);
-
if (args->op & LINUX_FUTEX_PRIVATE_FLAG) {
flags = 0;
args->op &= ~LINUX_FUTEX_PRIVATE_FLAG;
@@ -764,7 +683,6 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args)
args->op != LINUX_FUTEX_WAIT_REQUEUE_PI) {
LIN_SDT_PROBE0(futex, linux_sys_futex,
unimplemented_clockswitch);
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS);
return (ENOSYS);
}
@@ -788,7 +706,6 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args)
if (error) {
LIN_SDT_PROBE1(futex, linux_sys_futex, copyin_error,
error);
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
ts = &uts;
@@ -798,10 +715,8 @@ linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args)
retry0:
error = futex_get(args->uaddr, &wp, &f,
flags | FUTEX_CREATE_WP);
- if (error) {
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
+ if (error)
return (error);
- }
error = copyin_nofault(args->uaddr, &val, sizeof(val));
if (error) {
@@ -813,7 +728,6 @@ retry0:
error);
LINUX_CTR1(sys_futex, "WAIT copyin failed %d",
error);
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
if (val != args->val) {
@@ -824,9 +738,6 @@ retry0:
"WAIT uaddr %p val 0x%x != uval 0x%x",
args->uaddr, args->val, val);
futex_put(f, wp);
-
- LIN_SDT_PROBE1(futex, linux_sys_futex, return,
- EWOULDBLOCK);
return (EWOULDBLOCK);
}
@@ -845,15 +756,11 @@ retry0:
error = futex_get(args->uaddr, NULL, &f,
flags | FUTEX_DONTCREATE);
- if (error) {
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
+ if (error)
return (error);
- }
if (f == NULL) {
td->td_retval[0] = 0;
-
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
td->td_retval[0] = futex_wake(f, args->val, args->val3);
@@ -876,16 +783,13 @@ retry0:
if (args->uaddr == args->uaddr2) {
LIN_SDT_PROBE0(futex, linux_sys_futex,
invalid_cmp_requeue_use);
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, EINVAL);
return (EINVAL);
}
retry1:
error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK);
- if (error) {
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
+ if (error)
return (error);
- }
/*
* To avoid deadlocks return EINVAL if second futex
@@ -898,8 +802,6 @@ retry1:
flags | FUTEX_DONTEXISTS | FUTEX_DONTLOCK);
if (error) {
futex_put(f, NULL);
-
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
futex_lock(f);
@@ -915,7 +817,6 @@ retry1:
error);
LINUX_CTR1(sys_futex, "CMP_REQUEUE copyin failed %d",
error);
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
if (val != args->val3) {
@@ -925,8 +826,6 @@ retry1:
args->val, val);
futex_put(f2, NULL);
futex_put(f, NULL);
-
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, EAGAIN);
return (EAGAIN);
}
@@ -944,23 +843,17 @@ retry1:
args->uaddr, args->val, args->uaddr2, args->val3,
args->timeout);
- if (args->uaddr == args->uaddr2) {
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, EINVAL);
+ if (args->uaddr == args->uaddr2)
return (EINVAL);
- }
retry2:
error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK);
- if (error) {
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
+ if (error)
return (error);
- }
error = futex_get(args->uaddr2, NULL, &f2, flags | FUTEX_DONTLOCK);
if (error) {
futex_put(f, NULL);
-
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
futex_lock(f);
@@ -984,7 +877,6 @@ retry2:
error = copyin(args->uaddr2, &val, sizeof(val));
if (error == 0)
goto retry2;
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
@@ -1015,7 +907,6 @@ retry2:
LIN_SDT_PROBE0(futex, linux_sys_futex,
unimplemented_lock_pi);
}
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS);
return (ENOSYS);
case LINUX_FUTEX_UNLOCK_PI:
@@ -1027,7 +918,6 @@ retry2:
LIN_SDT_PROBE0(futex, linux_sys_futex,
unimplemented_unlock_pi);
}
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS);
return (ENOSYS);
case LINUX_FUTEX_TRYLOCK_PI:
@@ -1039,7 +929,6 @@ retry2:
LIN_SDT_PROBE0(futex, linux_sys_futex,
unimplemented_trylock_pi);
}
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS);
return (ENOSYS);
case LINUX_FUTEX_REQUEUE:
@@ -1056,8 +945,6 @@ retry2:
LIN_SDT_PROBE0(futex, linux_sys_futex,
deprecated_requeue);
}
-
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, EINVAL);
return (EINVAL);
case LINUX_FUTEX_WAIT_REQUEUE_PI:
@@ -1069,7 +956,6 @@ retry2:
LIN_SDT_PROBE0(futex, linux_sys_futex,
unimplemented_wait_requeue_pi);
}
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS);
return (ENOSYS);
case LINUX_FUTEX_CMP_REQUEUE_PI:
@@ -1081,18 +967,15 @@ retry2:
LIN_SDT_PROBE0(futex, linux_sys_futex,
unimplemented_cmp_requeue_pi);
}
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS);
return (ENOSYS);
default:
linux_msg(td, "unsupported futex op %d", args->op);
LIN_SDT_PROBE1(futex, linux_sys_futex, unknown_operation,
args->op);
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, ENOSYS);
return (ENOSYS);
}
- LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
@@ -1101,18 +984,14 @@ linux_set_robust_list(struct thread *td, struct linux_set_robust_list_args *args
{
struct linux_emuldata *em;
- LIN_SDT_PROBE2(futex, linux_set_robust_list, entry, td, args);
-
if (args->len != sizeof(struct linux_robust_list_head)) {
LIN_SDT_PROBE0(futex, linux_set_robust_list, size_error);
- LIN_SDT_PROBE1(futex, linux_set_robust_list, return, EINVAL);
return (EINVAL);
}
em = em_find(td);
em->robust_futexes = args->head;
- LIN_SDT_PROBE1(futex, linux_set_robust_list, return, 0);
return (0);
}
@@ -1125,22 +1004,15 @@ linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args
struct thread *td2;
int error = 0;
- LIN_SDT_PROBE2(futex, linux_get_robust_list, entry, td, args);
-
if (!args->pid) {
em = em_find(td);
KASSERT(em != NULL, ("get_robust_list: emuldata notfound.\n"));
head = em->robust_futexes;
} else {
td2 = tdfind(args->pid, -1);
- if (td2 == NULL) {
- LIN_SDT_PROBE1(futex, linux_get_robust_list, return,
- ESRCH);
+ if (td2 == NULL)
return (ESRCH);
- }
if (SV_PROC_ABI(td2->td_proc) != SV_ABI_LINUX) {
- LIN_SDT_PROBE1(futex, linux_get_robust_list, return,
- EPERM);
PROC_UNLOCK(td2->td_proc);
return (EPERM);
}
@@ -1152,9 +1024,6 @@ linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args
priv_check(td, PRIV_CRED_SETEUID) ||
p_candebug(td, td2->td_proc)) {
PROC_UNLOCK(td2->td_proc);
-
- LIN_SDT_PROBE1(futex, linux_get_robust_list, return,
- EPERM);
return (EPERM);
}
head = em->robust_futexes;
@@ -1166,7 +1035,6 @@ linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args
if (error) {
LIN_SDT_PROBE1(futex, linux_get_robust_list, copyout_error,
error);
- LIN_SDT_PROBE1(futex, linux_get_robust_list, return, EFAULT);
return (EFAULT);
}
@@ -1176,7 +1044,6 @@ linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args
error);
}
- LIN_SDT_PROBE1(futex, linux_get_robust_list, return, error);
return (error);
}
@@ -1188,24 +1055,18 @@ handle_futex_death(struct linux_emuldata *em, uint32_t *uaddr,
struct futex *f;
int error;
- LIN_SDT_PROBE3(futex, handle_futex_death, entry, em, uaddr, pi);
-
retry:
error = copyin(uaddr, &uval, 4);
if (error) {
LIN_SDT_PROBE1(futex, handle_futex_death, copyin_error, error);
- LIN_SDT_PROBE1(futex, handle_futex_death, return, EFAULT);
return (EFAULT);
}
if ((uval & FUTEX_TID_MASK) == em->em_tid) {
mval = (uval & FUTEX_WAITERS) | FUTEX_OWNER_DIED;
nval = casuword32(uaddr, uval, mval);
- if (nval == -1) {
- LIN_SDT_PROBE1(futex, handle_futex_death, return,
- EFAULT);
+ if (nval == -1)
return (EFAULT);
- }
if (nval != uval)
goto retry;
@@ -1213,11 +1074,8 @@ retry:
if (!pi && (uval & FUTEX_WAITERS)) {
error = futex_get(uaddr, NULL, &f,
FUTEX_DONTCREATE | FUTEX_SHARED);
- if (error) {
- LIN_SDT_PROBE1(futex, handle_futex_death,
- return, error);
+ if (error)
return (error);
- }
if (f != NULL) {
futex_wake(f, 1, FUTEX_BITSET_MATCH_ANY);
futex_put(f, NULL);
@@ -1225,7 +1083,6 @@ retry:
}
}
- LIN_SDT_PROBE1(futex, handle_futex_death, return, 0);
return (0);
}
@@ -1236,19 +1093,15 @@ fetch_robust_entry(struct linux_robust_list **entry,
l_ulong uentry;
int error;
- LIN_SDT_PROBE3(futex, fetch_robust_entry, entry, entry, head, pi);
-
error = copyin((const void *)head, &uentry, sizeof(l_ulong));
if (error) {
LIN_SDT_PROBE1(futex, fetch_robust_entry, copyin_error, error);
- LIN_SDT_PROBE1(futex, fetch_robust_entry, return, EFAULT);
return (EFAULT);
}
*entry = (void *)(uentry & ~1UL);
*pi = uentry & 1;
- LIN_SDT_PROBE1(futex, fetch_robust_entry, return, 0);
return (0);
}
@@ -1262,32 +1115,23 @@ release_futexes(struct thread *td, struct linux_emuldata *em)
l_long futex_offset;
int rc, error;
- LIN_SDT_PROBE2(futex, release_futexes, entry, td, em);
-
head = em->robust_futexes;
- if (head == NULL) {
- LIN_SDT_PROBE0(futex, release_futexes, return);
+ if (head == NULL)
return;
- }
- if (fetch_robust_entry(&entry, PTRIN(&head->list.next), &pi)) {
- LIN_SDT_PROBE0(futex, release_futexes, return);
+ if (fetch_robust_entry(&entry, PTRIN(&head->list.next), &pi))
return;
- }
error = copyin(&head->futex_offset, &futex_offset,
sizeof(futex_offset));
if (error) {
LIN_SDT_PROBE1(futex, release_futexes, copyin_error, error);
- LIN_SDT_PROBE0(futex, release_futexes, return);
return;
}
- if (fetch_robust_entry(&pending, PTRIN(&head->pending_list), &pip)) {
- LIN_SDT_PROBE0(futex, release_futexes, return);
+ if (fetch_robust_entry(&pending, PTRIN(&head->pending_list), &pip))
return;
- }
while (entry != &head->list) {
rc = fetch_robust_entry(&next_entry, PTRIN(&entry->next), &next_pi);
@@ -1295,13 +1139,10 @@ release_futexes(struct thread *td, struct linux_emuldata *em)
if (entry != pending)
if (handle_futex_death(em,
(uint32_t *)((caddr_t)entry + futex_offset), pi)) {
- LIN_SDT_PROBE0(futex, release_futexes, return);
return;
}
- if (rc) {
- LIN_SDT_PROBE0(futex, release_futexes, return);
+ if (rc)
return;
- }
entry = next_entry;
pi = next_pi;
@@ -1314,6 +1155,4 @@ release_futexes(struct thread *td, struct linux_emuldata *em)
if (pending)
handle_futex_death(em, (uint32_t *)((caddr_t)pending + futex_offset), pip);
-
- LIN_SDT_PROBE0(futex, release_futexes, return);
}
diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c
index 76d04164a807..e722280a2bbf 100644
--- a/sys/compat/linux/linux_sysctl.c
+++ b/sys/compat/linux/linux_sysctl.c
@@ -75,16 +75,10 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
/**
* DTrace probes in this module.
*/
-LIN_SDT_PROBE_DEFINE2(sysctl, handle_string, entry, "struct l___sysctl_args *",
- "char *");
LIN_SDT_PROBE_DEFINE1(sysctl, handle_string, copyout_error, "int");
-LIN_SDT_PROBE_DEFINE1(sysctl, handle_string, return, "int");
-LIN_SDT_PROBE_DEFINE2(sysctl, linux_sysctl, entry, "struct l___sysctl_args *",
- "struct thread *");
LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, copyin_error, "int");
LIN_SDT_PROBE_DEFINE2(sysctl, linux_sysctl, wrong_length, "int", "int");
LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, unsupported_sysctl, "char *");
-LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, return, "int");
#ifdef LINUX_LEGACY_SYSCALLS
static int
@@ -92,8 +86,6 @@ handle_string(struct l___sysctl_args *la, char *value)
{
int error;
- LIN_SDT_PROBE2(sysctl, handle_string, entry, la, value);
-
if (la->oldval != 0) {
l_int len = strlen(value);
error = copyout(value, PTRIN(la->oldval), len + 1);
@@ -102,17 +94,13 @@ handle_string(struct l___sysctl_args *la, char *value)
if (error) {
LIN_SDT_PROBE1(sysctl, handle_string, copyout_error,
error);
- LIN_SDT_PROBE1(sysctl, handle_string, return, error);
return (error);
}
}
- if (la->newval != 0) {
- LIN_SDT_PROBE1(sysctl, handle_string, return, ENOTDIR);
+ if (la->newval != 0)
return (ENOTDIR);
- }
- LIN_SDT_PROBE1(sysctl, handle_string, return, 0);
return (0);
}
@@ -125,19 +113,15 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args)
char *sysctl_string;
int error, i;
- LIN_SDT_PROBE2(sysctl, linux_sysctl, entry, td, args->args);
-
error = copyin(args->args, &la, sizeof(la));
if (error) {
LIN_SDT_PROBE1(sysctl, linux_sysctl, copyin_error, error);
- LIN_SDT_PROBE1(sysctl, linux_sysctl, return, error);
return (error);
}
if (la.nlen <= 0 || la.nlen > LINUX_CTL_MAXNAME) {
LIN_SDT_PROBE2(sysctl, linux_sysctl, wrong_length, la.nlen,
LINUX_CTL_MAXNAME);
- LIN_SDT_PROBE1(sysctl, linux_sysctl, return, ENOTDIR);
return (ENOTDIR);
}
@@ -145,7 +129,6 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args)
error = copyin(PTRIN(la.name), mib, la.nlen * sizeof(l_int));
if (error) {
LIN_SDT_PROBE1(sysctl, linux_sysctl, copyin_error, error);
- LIN_SDT_PROBE1(sysctl, linux_sysctl, return, error);
free(mib, M_LINUX);
return (error);
}
@@ -159,7 +142,6 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args)
case LINUX_KERN_VERSION:
error = handle_string(&la, version);
free(mib, M_LINUX);
- LIN_SDT_PROBE1(sysctl, linux_sysctl, return, error);
return (error);
default:
break;
@@ -189,7 +171,6 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args)
free(mib, M_LINUX);
- LIN_SDT_PROBE1(sysctl, linux_sysctl, return, ENOTDIR);
return (ENOTDIR);
}
#endif
diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c
index 6f1ef36a9114..1d7dcc869159 100644
--- a/sys/compat/linux/linux_time.c
+++ b/sys/compat/linux/linux_time.c
@@ -75,58 +75,33 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
/**
* DTrace probes in this module.
*/
-LIN_SDT_PROBE_DEFINE2(time, native_to_linux_timespec, entry,
- "struct l_timespec *", "struct timespec *");
-LIN_SDT_PROBE_DEFINE0(time, native_to_linux_timespec, return);
-LIN_SDT_PROBE_DEFINE2(time, linux_to_native_timespec, entry,
- "struct timespec *", "struct l_timespec *");
-LIN_SDT_PROBE_DEFINE1(time, linux_to_native_timespec, return, "int");
-LIN_SDT_PROBE_DEFINE2(time, linux_to_native_clockid, entry, "clockid_t *",
- "clockid_t");
LIN_SDT_PROBE_DEFINE1(time, linux_to_native_clockid, unsupported_clockid,
"clockid_t");
LIN_SDT_PROBE_DEFINE1(time, linux_to_native_clockid, unknown_clockid,
"clockid_t");
-LIN_SDT_PROBE_DEFINE1(time, linux_to_native_clockid, return, "int");
-LIN_SDT_PROBE_DEFINE2(time, linux_clock_gettime, entry, "clockid_t",
- "struct l_timespec *");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_gettime, conversion_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_gettime, gettime_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_gettime, copyout_error, "int");
-LIN_SDT_PROBE_DEFINE1(time, linux_clock_gettime, return, "int");
-LIN_SDT_PROBE_DEFINE2(time, linux_clock_settime, entry, "clockid_t",
- "struct l_timespec *");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_settime, conversion_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_settime, settime_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_settime, copyin_error, "int");
-LIN_SDT_PROBE_DEFINE1(time, linux_clock_settime, return, "int");
-LIN_SDT_PROBE_DEFINE2(time, linux_clock_getres, entry, "clockid_t",
- "struct l_timespec *");
LIN_SDT_PROBE_DEFINE0(time, linux_clock_getres, nullcall);
LIN_SDT_PROBE_DEFINE1(time, linux_clock_getres, conversion_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_getres, getres_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_getres, copyout_error, "int");
-LIN_SDT_PROBE_DEFINE1(time, linux_clock_getres, return, "int");
-LIN_SDT_PROBE_DEFINE2(time, linux_nanosleep, entry, "const struct l_timespec *",
- "struct l_timespec *");
LIN_SDT_PROBE_DEFINE1(time, linux_nanosleep, conversion_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_nanosleep, copyout_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_nanosleep, copyin_error, "int");
-LIN_SDT_PROBE_DEFINE1(time, linux_nanosleep, return, "int");
-LIN_SDT_PROBE_DEFINE4(time, linux_clock_nanosleep, entry, "clockid_t", "int",
- "struct l_timespec *", "struct l_timespec *");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, conversion_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, copyout_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, copyin_error, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, unsupported_flags, "int");
LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, unsupported_clockid, "int");
-LIN_SDT_PROBE_DEFINE1(time, linux_clock_nanosleep, return, "int");
int
native_to_linux_timespec(struct l_timespec *ltp, struct timespec *ntp)
{
- LIN_SDT_PROBE2(time, native_to_linux_timespec, entry, ltp, ntp);
#ifdef COMPAT_LINUX32
if (ntp->tv_sec > INT_MAX || ntp->tv_sec < INT_MIN)
return (EOVERFLOW);
@@ -134,7 +109,6 @@ native_to_linux_timespec(struct l_timespec *ltp, struct timespec *ntp)
ltp->tv_sec = ntp->tv_sec;
ltp->tv_nsec = ntp->tv_nsec;
- LIN_SDT_PROBE0(time, native_to_linux_timespec, return);
return (0);
}
@@ -142,16 +116,11 @@ int
linux_to_native_timespec(struct timespec *ntp, struct l_timespec *ltp)
{
- LIN_SDT_PROBE2(time, linux_to_native_timespec, entry, ntp, ltp);
-
- if (ltp->tv_sec < 0 || ltp->tv_nsec < 0 || ltp->tv_nsec > 999999999) {
- LIN_SDT_PROBE1(time, linux_to_native_timespec, return, EINVAL);
+ if (ltp->tv_sec < 0 || ltp->tv_nsec < 0 || ltp->tv_nsec > 999999999)
return (EINVAL);
- }
ntp->tv_sec = ltp->tv_sec;
ntp->tv_nsec = ltp->tv_nsec;
- LIN_SDT_PROBE1(time, linux_to_native_timespec, return, 0);
return (0);
}
@@ -181,8 +150,6 @@ int
linux_to_native_clockid(clockid_t *n, clockid_t l)
{
- LIN_SDT_PROBE2(time, linux_to_native_clockid, entry, n, l);
-
if (l < 0) {
/* cpu-clock */
if ((l & LINUX_CLOCKFD_MASK) == LINUX_CLOCKFD)
@@ -226,16 +193,13 @@ linux_to_native_clockid(clockid_t *n, clockid_t l)
case LINUX_CLOCK_TAI:
LIN_SDT_PROBE1(time, linux_to_native_clockid,
unsupported_clockid, l);
- LIN_SDT_PROBE1(time, linux_to_native_clockid, return, EINVAL);
return (EINVAL);
default:
LIN_SDT_PROBE1(time, linux_to_native_clockid,
unknown_clockid, l);
- LIN_SDT_PROBE1(time, linux_to_native_clockid, return, EINVAL);
return (EINVAL);
}
- LIN_SDT_PROBE1(time, linux_to_native_clockid, return, 0);
return (0);
}
@@ -264,15 +228,12 @@ linux_clock_gettime(struct thread *td, struct linux_clock_gettime_args *args)
pid_t pid;
lwpid_t tid;
- LIN_SDT_PROBE2(time, linux_clock_gettime, entry, args->which, args->tp);
-
error = linux_to_native_clockid(&nwhich, args->which);
if (error != 0) {
linux_msg(curthread,
"unsupported clock_gettime clockid %d", args->which);
LIN_SDT_PROBE1(time, linux_clock_gettime, conversion_error,
error);
- LIN_SDT_PROBE1(time, linux_clock_gettime, return, error);
return (error);
}
@@ -375,7 +336,6 @@ linux_clock_gettime(struct thread *td, struct linux_clock_gettime_args *args)
}
if (error != 0) {
LIN_SDT_PROBE1(time, linux_clock_gettime, gettime_error, error);
- LIN_SDT_PROBE1(time, linux_clock_gettime, return, error);
return (error);
}
error = native_to_linux_timespec(<s, &tp);
@@ -385,7 +345,6 @@ linux_clock_gettime(struct thread *td, struct linux_clock_gettime_args *args)
if (error != 0)
LIN_SDT_PROBE1(time, linux_clock_gettime, copyout_error, error);
- LIN_SDT_PROBE1(time, linux_clock_gettime, return, error);
return (error);
}
@@ -397,28 +356,23 @@ linux_clock_settime(struct thread *td, struct linux_clock_settime_args *args)
int error;
clockid_t nwhich;
- LIN_SDT_PROBE2(time, linux_clock_settime, entry, args->which, args->tp);
-
error = linux_to_native_clockid(&nwhich, args->which);
if (error != 0) {
linux_msg(curthread,
"unsupported clock_settime clockid %d", args->which);
LIN_SDT_PROBE1(time, linux_clock_settime, conversion_error,
error);
- LIN_SDT_PROBE1(time, linux_clock_settime, return, error);
return (error);
}
error = copyin(args->tp, <s, sizeof lts);
if (error != 0) {
LIN_SDT_PROBE1(time, linux_clock_settime, copyin_error, error);
- LIN_SDT_PROBE1(time, linux_clock_settime, return, error);
return (error);
}
error = linux_to_native_timespec(&ts, <s);
*** 450 LINES SKIPPED ***
More information about the dev-commits-src-main
mailing list