Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jun 2022 19:37:40 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0783310f4d94 - stable/13 - linux(4): Eliminating remnants of futex sdt.
Message-ID:  <202206171937.25HJbehe013664@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=0783310f4d94e6152c346f6372f57b30240e57e6

commit 0783310f4d94e6152c346f6372f57b30240e57e6
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-07-29 09:52:36 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-17 19:33:22 +0000

    linux(4): Eliminating remnants of futex sdt.
    
    MFC after:              2 weeks
    
    (cherry picked from commit edd44176aa0e1acdb3a97746c6fe595d12be0c45)
---
 sys/compat/linux/check_error.d | 25 --------------
 sys/compat/linux/linux_futex.c | 76 +++---------------------------------------
 2 files changed, 5 insertions(+), 96 deletions(-)

diff --git a/sys/compat/linux/check_error.d b/sys/compat/linux/check_error.d
index 389e768aa3f6..8ed87a397863 100644
--- a/sys/compat/linux/check_error.d
+++ b/sys/compat/linux/check_error.d
@@ -39,28 +39,6 @@ linuxulator*:dummy::not_implemented,
 linuxulator*:emul:linux_thread_detach:child_clear_tid_error,
 linuxulator*:emul:linux_thread_detach:futex_failed,
 linuxulator*:emul:linux_schedtail:copyout_error,
-linuxulator*:futex:futex_get:error,
-linuxulator*:futex:futex_sleep:requeue_error,
-linuxulator*:futex:futex_sleep:sleep_error,
-linuxulator*:futex:futex_wait:copyin_error,
-linuxulator*:futex:futex_wait:itimerfix_error,
-linuxulator*:futex:futex_wait:sleep_error,
-linuxulator*:futex:futex_atomic_op:missing_access_check,
-linuxulator*:futex:futex_atomic_op:unimplemented_op,
-linuxulator*:futex:futex_atomic_op:unimplemented_cmp,
-linuxulator*:futex:linux_sys_futex:unimplemented_clockswitch,
-linuxulator*:futex:linux_sys_futex:copyin_error,
-linuxulator*:futex:linux_sys_futex:unhandled_efault,
-linuxulator*:futex:linux_sys_futex:unimplemented_lock_pi,
-linuxulator*:futex:linux_sys_futex:unimplemented_unlock_pi,
-linuxulator*:futex:linux_sys_futex:unimplemented_trylock_pi,
-linuxulator*:futex:linux_sys_futex:unimplemented_wait_requeue_pi,
-linuxulator*:futex:linux_sys_futex:unimplemented_cmp_requeue_pi,
-linuxulator*:futex:linux_sys_futex:unknown_operation,
-linuxulator*:futex:linux_get_robust_list:copyout_error,
-linuxulator*:futex:handle_futex_death:copyin_error,
-linuxulator*:futex:fetch_robust_entry:copyin_error,
-linuxulator*:futex:release_futexes:copyin_error,
 linuxulator*:time:linux_clock_gettime:conversion_error,
 linuxulator*:time:linux_clock_gettime:gettime_error,
 linuxulator*:time:linux_clock_gettime:copyout_error,
@@ -98,9 +76,6 @@ linuxulator*:mib:linux_prison_get:vfs_setopts_error
 
 linuxulator*:util:linux_driver_get_name_dev:nullcall,
 linuxulator*:util:linux_driver_get_major_minor:nullcall,
-linuxulator*:futex:linux_sys_futex:invalid_cmp_requeue_use,
-linuxulator*:futex:linux_sys_futex:deprecated_requeue,
-linuxulator*:futex:linux_set_robust_list:size_error,
 linuxulator*:time:linux_clock_getres:nullcall
 {
 	printf("WARNING: %s:%s:%s:%s in application %s, maybe an application error?\n", probename, probeprov, probemod, probefunc, execname);
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c
index 8bc8879c92c6..510b43f11ca4 100644
--- a/sys/compat/linux/linux_futex.c
+++ b/sys/compat/linux/linux_futex.c
@@ -56,7 +56,6 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $")
 #include <sys/proc.h>
 #include <sys/queue.h>
 #include <sys/sched.h>
-#include <sys/sdt.h>
 #include <sys/umtxvar.h>
 
 #include <vm/vm_extern.h>
@@ -68,40 +67,12 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $")
 #include <machine/../linux/linux.h>
 #include <machine/../linux/linux_proto.h>
 #endif
-#include <compat/linux/linux_dtrace.h>
 #include <compat/linux/linux_emul.h>
 #include <compat/linux/linux_futex.h>
 #include <compat/linux/linux_misc.h>
 #include <compat/linux/linux_timer.h>
 #include <compat/linux/linux_util.h>
 
-/* DTrace init */
-LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
-
-/**
- * DTrace probes in this module.
- */
-LIN_SDT_PROBE_DEFINE4(futex, futex_atomic_op, decoded_op, "int", "int", "int",
-    "int");
-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_DEFINE3(futex, linux_futex, debug_wait, "uint32_t *",
-    "uint32_t", "uint32_t");
-LIN_SDT_PROBE_DEFINE3(futex, linux_futex, debug_wake, "uint32_t *",
-    "uint32_t", "uint32_t");
-LIN_SDT_PROBE_DEFINE5(futex, linux_futex, debug_cmp_requeue, "uint32_t *",
-    "uint32_t", "uint32_t", "uint32_t *", "struct l_timespec *");
-LIN_SDT_PROBE_DEFINE5(futex, linux_futex, debug_wake_op, "uint32_t *",
-    "int", "uint32_t", "uint32_t *", "uint32_t");
-LIN_SDT_PROBE_DEFINE0(futex, linux_futex, deprecated_requeue);
-LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unimplemented_wait_requeue_pi);
-LIN_SDT_PROBE_DEFINE0(futex, linux_futex, unimplemented_cmp_requeue_pi);
-LIN_SDT_PROBE_DEFINE1(futex, linux_futex, unknown_operation, "int");
-LIN_SDT_PROBE_DEFINE0(futex, linux_set_robust_list, size_error);
-LIN_SDT_PROBE_DEFINE1(futex, linux_get_robust_list, copyout_error, "int");
-LIN_SDT_PROBE_DEFINE1(futex, fetch_robust_entry, copyin_error, "int");
-LIN_SDT_PROBE_DEFINE1(futex, release_futexes, copyin_error, "int");
-
 #define	FUTEX_SHARED	0x8     /* shared futex */
 
 #define	GET_SHARED(a)	(a->flags & FUTEX_SHARED) ? AUTO_SHARE : THREAD_SHARE
@@ -188,9 +159,6 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr)
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
-	LIN_SDT_PROBE4(futex, futex_atomic_op, decoded_op, op, cmp, oparg,
-	    cmparg);
-
 	switch (op) {
 	case FUTEX_OP_SET:
 		ret = futex_xchgl(oparg, uaddr, &oldval);
@@ -208,7 +176,6 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr)
 		ret = futex_xorl(oparg, uaddr, &oldval);
 		break;
 	default:
-		LIN_SDT_PROBE1(futex, futex_atomic_op, unimplemented_op, op);
 		ret = -ENOSYS;
 		break;
 	}
@@ -236,7 +203,6 @@ futex_atomic_op(struct thread *td, int encoded_op, uint32_t *uaddr)
 		ret = (oldval > cmparg);
 		break;
 	default:
-		LIN_SDT_PROBE1(futex, futex_atomic_op, unimplemented_cmp, cmp);
 		ret = -ENOSYS;
 	}
 
@@ -264,8 +230,6 @@ linux_futex(struct thread *td, struct linux_futex_args *args)
 		/* FALLTHROUGH */
 
 	case LINUX_FUTEX_WAIT_BITSET:
-		LIN_SDT_PROBE3(futex, linux_futex, debug_wait, args->uaddr,
-		    args->val, args->val3);
 		LINUX_CTR3(sys_futex, "WAIT uaddr %p val 0x%x bitset 0x%x",
 		    args->uaddr, args->val, args->val3);
 
@@ -276,8 +240,6 @@ linux_futex(struct thread *td, struct linux_futex_args *args)
 		/* FALLTHROUGH */
 
 	case LINUX_FUTEX_WAKE_BITSET:
-		LIN_SDT_PROBE3(futex, linux_futex, debug_wake, args->uaddr,
-		    args->val, args->val3);
 		LINUX_CTR3(sys_futex, "WAKE uaddr %p nrwake 0x%x bitset 0x%x",
 		    args->uaddr, args->val, args->val3);
 
@@ -294,8 +256,6 @@ linux_futex(struct thread *td, struct linux_futex_args *args)
 		if ((pem->flags & LINUX_XDEPR_REQUEUEOP) == 0) {
 			linux_msg(td, "unsupported FUTEX_REQUEUE");
 			pem->flags |= LINUX_XDEPR_REQUEUEOP;
-			LIN_SDT_PROBE0(futex, linux_futex,
-			    deprecated_requeue);
 		}
 
 		/*
@@ -311,9 +271,6 @@ linux_futex(struct thread *td, struct linux_futex_args *args)
 		/* FALLTHROUGH */
 
 	case LINUX_FUTEX_CMP_REQUEUE:
-		LIN_SDT_PROBE5(futex, linux_futex, debug_cmp_requeue,
-		    args->uaddr, args->val, args->val3, args->uaddr2,
-		    args->ts);
 		LINUX_CTR5(sys_futex, "CMP_REQUEUE uaddr %p "
 		    "nrwake 0x%x uval 0x%x uaddr2 %p nrequeue 0x%x",
 		    args->uaddr, args->val, args->val3, args->uaddr2,
@@ -322,8 +279,6 @@ linux_futex(struct thread *td, struct linux_futex_args *args)
 		return (linux_futex_requeue(td, args));
 
 	case LINUX_FUTEX_WAKE_OP:
-		LIN_SDT_PROBE5(futex, linux_futex, debug_wake_op,
-		    args->uaddr, args->op, args->val, args->uaddr2, args->val3);
 		LINUX_CTR5(sys_futex, "WAKE_OP "
 		    "uaddr %p nrwake 0x%x uaddr2 %p op 0x%x nrwake2 0x%x",
 		    args->uaddr, args->val, args->uaddr2, args->val3,
@@ -356,8 +311,6 @@ linux_futex(struct thread *td, struct linux_futex_args *args)
 		if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) {
 			linux_msg(td, "unsupported FUTEX_WAIT_REQUEUE_PI");
 			pem->flags |= LINUX_XUNSUP_FUTEXPIOP;
-			LIN_SDT_PROBE0(futex, linux_futex,
-			    unimplemented_wait_requeue_pi);
 		}
 		return (ENOSYS);
 
@@ -367,15 +320,11 @@ linux_futex(struct thread *td, struct linux_futex_args *args)
 		if ((pem->flags & LINUX_XUNSUP_FUTEXPIOP) == 0) {
 			linux_msg(td, "unsupported FUTEX_CMP_REQUEUE_PI");
 			pem->flags |= LINUX_XUNSUP_FUTEXPIOP;
-			LIN_SDT_PROBE0(futex, linux_futex,
-			    unimplemented_cmp_requeue_pi);
 		}
 		return (ENOSYS);
 
 	default:
 		linux_msg(td, "unsupported futex op %d", args->op);
-		LIN_SDT_PROBE1(futex, linux_futex, unknown_operation,
-		    args->op);
 		return (ENOSYS);
 	}
 }
@@ -930,10 +879,8 @@ linux_set_robust_list(struct thread *td, struct linux_set_robust_list_args *args
 {
 	struct linux_emuldata *em;
 
-	if (args->len != sizeof(struct linux_robust_list_head)) {
-		LIN_SDT_PROBE0(futex, linux_set_robust_list, size_error);
+	if (args->len != sizeof(struct linux_robust_list_head))
 		return (EINVAL);
-	}
 
 	em = em_find(td);
 	em->robust_futexes = args->head;
@@ -978,19 +925,10 @@ linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args
 	}
 
 	error = copyout(&len, args->len, sizeof(l_size_t));
-	if (error) {
-		LIN_SDT_PROBE1(futex, linux_get_robust_list, copyout_error,
-		    error);
+	if (error)
 		return (EFAULT);
-	}
-
-	error = copyout(&head, args->head, sizeof(head));
-	if (error) {
-		LIN_SDT_PROBE1(futex, linux_get_robust_list, copyout_error,
-		    error);
-	}
 
-	return (error);
+	return (copyout(&head, args->head, sizeof(head)));
 }
 
 static int
@@ -1063,10 +1001,8 @@ fetch_robust_entry(struct linux_robust_list **entry,
 	int error;
 
 	error = copyin((const void *)head, &uentry, sizeof(l_ulong));
-	if (error) {
-		LIN_SDT_PROBE1(futex, fetch_robust_entry, copyin_error, error);
+	if (error)
 		return (EFAULT);
-	}
 
 	*entry = (void *)(uentry & ~1UL);
 	*pi = uentry & 1;
@@ -1098,10 +1034,8 @@ release_futexes(struct thread *td, struct linux_emuldata *em)
 
 	error = copyin(&head->futex_offset, &futex_offset,
 	    sizeof(futex_offset));
-	if (error) {
-		LIN_SDT_PROBE1(futex, release_futexes, copyin_error, error);
+	if (error)
 		return;
-	}
 
 	if (fetch_robust_entry(&pending, PTRIN(&head->pending_list), &pip))
 		return;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206171937.25HJbehe013664>