Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108587094
D29250.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D29250.diff
View Options
Index: sys/compat/linux/linux_futex.c
===================================================================
--- sys/compat/linux/linux_futex.c
+++ sys/compat/linux/linux_futex.c
@@ -47,7 +47,6 @@
#include <sys/systm.h>
#include <sys/imgact.h>
#include <sys/kernel.h>
-#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
@@ -315,8 +314,6 @@
LIN_SDT_PROBE3(futex, futex_put, destroy, f->f_uaddr,
f->f_refcount, f->f_key.shared);
- LINUX_CTR3(sys_futex, "futex_put destroy uaddr %p ref %d "
- "shared %d", f->f_uaddr, f->f_refcount, f->f_key.shared);
umtx_key_release(&f->f_key);
FUTEX_DESTROY(f);
free(f, M_FUTEX);
@@ -327,8 +324,6 @@
LIN_SDT_PROBE3(futex, futex_put, unlock, f->f_uaddr, f->f_refcount,
f->f_key.shared);
- LINUX_CTR3(sys_futex, "futex_put uaddr %p ref %d shared %d",
- f->f_uaddr, f->f_refcount, f->f_key.shared);
if (FUTEX_LOCKED(f))
futex_unlock(f);
FUTEXES_UNLOCK;
@@ -386,8 +381,6 @@
*newf = f;
LIN_SDT_PROBE3(futex, futex_get0, shared, uaddr,
f->f_refcount, f->f_key.shared);
- 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);
@@ -398,7 +391,6 @@
FUTEXES_UNLOCK;
umtx_key_release(&key);
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);
@@ -428,8 +420,6 @@
LIN_SDT_PROBE3(futex, futex_get0, new, uaddr, tmpf->f_refcount,
tmpf->f_key.shared);
- LINUX_CTR3(sys_futex, "futex_get uaddr %p ref %d shared %d new",
- uaddr, tmpf->f_refcount, tmpf->f_key.shared);
*newf = tmpf;
LIN_SDT_PROBE1(futex, futex_get0, return, 0);
@@ -471,8 +461,6 @@
futex_lock(struct futex *f)
{
- LINUX_CTR3(sys_futex, "futex_lock uaddr %p ref %d shared %d",
- f->f_uaddr, f->f_refcount, f->f_key.shared);
FUTEX_ASSERT_UNLOCKED(f);
FUTEX_LOCK(f);
}
@@ -481,8 +469,6 @@
futex_unlock(struct futex *f)
{
- LINUX_CTR3(sys_futex, "futex_unlock uaddr %p ref %d shared %d",
- f->f_uaddr, f->f_refcount, f->f_key.shared);
FUTEX_ASSERT_LOCKED(f);
FUTEX_UNLOCK(f);
}
@@ -513,33 +499,21 @@
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);
error = msleep_sbt(wp, &f->f_lck, PCATCH, "futex", sbt, prec, C_ABSOLUTE);
if (wp->wp_flags & FUTEX_WP_REQUEUED) {
KASSERT(f != wp->wp_futex, ("futex != wp_futex"));
- if (error) {
- LIN_SDT_PROBE5(futex, futex_sleep, requeue_error, error,
- f->f_uaddr, wp, wp->wp_futex->f_uaddr,
- wp->wp_futex->f_refcount);
- }
-
- LINUX_CTR5(sys_futex, "futex_sleep out error %d uaddr %p wp"
- " %p requeued uaddr %p ref %d",
- error, f->f_uaddr, wp, wp->wp_futex->f_uaddr,
+ LIN_SDT_PROBE5(futex, futex_sleep, requeue_error, error,
+ f->f_uaddr, wp, wp->wp_futex->f_uaddr,
wp->wp_futex->f_refcount);
+
futex_put(f, NULL);
f = wp->wp_futex;
futex_lock(f);
} else {
- if (error) {
- LIN_SDT_PROBE3(futex, futex_sleep, sleep_error, error,
- f->f_uaddr, wp);
- }
- LINUX_CTR3(sys_futex, "futex_sleep out error %d uaddr %p wp %p",
- error, f->f_uaddr, wp);
+ LIN_SDT_PROBE3(futex, futex_sleep, sleep_error, error,
+ f->f_uaddr, wp);
}
futex_put(f, wp);
@@ -565,8 +539,6 @@
TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) {
LIN_SDT_PROBE3(futex, futex_wake, iterate, f->f_uaddr, wp,
f->f_refcount);
- LINUX_CTR3(sys_futex, "futex_wake uaddr %p wp %p ref %d",
- f->f_uaddr, wp, f->f_refcount);
/*
* Unless we find a matching bit in
* the bitset, continue searching.
@@ -599,8 +571,6 @@
TAILQ_FOREACH_SAFE(wp, &f->f_waiting_proc, wp_list, wpt) {
if (++count <= n) {
- LINUX_CTR2(sys_futex, "futex_req_wake uaddr %p wp %p",
- f->f_uaddr, wp);
wp->wp_flags |= FUTEX_WP_REMOVED;
TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
LIN_SDT_PROBE1(futex, futex_requeue, wakeup, wp);
@@ -608,8 +578,6 @@
} else {
LIN_SDT_PROBE3(futex, futex_requeue, requeue,
f->f_uaddr, wp, f2->f_uaddr);
- LINUX_CTR3(sys_futex, "futex_requeue uaddr %p wp %p to %p",
- f->f_uaddr, wp, f2->f_uaddr);
wp->wp_flags |= FUTEX_WP_REQUEUED;
/* Move wp to wp_list of f2 futex */
TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
@@ -779,8 +747,6 @@
case LINUX_FUTEX_WAIT_BITSET:
LIN_SDT_PROBE3(futex, linux_sys_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);
if (args->timeout != NULL) {
error = futex_copyin_timeout(args->op, args->timeout,
@@ -811,8 +777,6 @@
goto retry0;
LIN_SDT_PROBE1(futex, linux_sys_futex, copyin_error,
error);
- LINUX_CTR1(sys_futex, "WAIT copyin failed %d",
- error);
LIN_SDT_PROBE1(futex, linux_sys_futex, return, error);
return (error);
}
@@ -820,9 +784,6 @@
LIN_SDT_PROBE4(futex, linux_sys_futex,
debug_wait_value_neq, args->uaddr, args->val, val,
args->val3);
- LINUX_CTR3(sys_futex,
- "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,
@@ -840,8 +801,6 @@
case LINUX_FUTEX_WAKE_BITSET:
LIN_SDT_PROBE3(futex, linux_sys_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);
error = futex_get(args->uaddr, NULL, &f,
flags | FUTEX_DONTCREATE);
@@ -864,10 +823,6 @@
LIN_SDT_PROBE5(futex, linux_sys_futex, debug_cmp_requeue,
args->uaddr, args->val, args->val3, args->uaddr2,
args->timeout);
- 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,
- args->timeout);
/*
* Linux allows this, we would not, it is an incorrect
@@ -913,16 +868,12 @@
goto retry1;
LIN_SDT_PROBE1(futex, linux_sys_futex, copyin_error,
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) {
LIN_SDT_PROBE2(futex, linux_sys_futex,
debug_cmp_requeue_value_neq, args->val, val);
- LINUX_CTR2(sys_futex, "CMP_REQUEUE val 0x%x != uval 0x%x",
- args->val, val);
futex_put(f2, NULL);
futex_put(f, NULL);
@@ -939,10 +890,6 @@
case LINUX_FUTEX_WAKE_OP:
LIN_SDT_PROBE5(futex, linux_sys_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,
- args->timeout);
if (args->uaddr == args->uaddr2) {
LIN_SDT_PROBE1(futex, linux_sys_futex, return, EINVAL);
@@ -974,9 +921,6 @@
op_ret = futex_atomic_op(td, args->val3, args->uaddr2);
vm_fault_enable_pagefaults(save);
- LINUX_CTR2(sys_futex, "WAKE_OP atomic_op uaddr %p ret 0x%x",
- args->uaddr, op_ret);
-
if (op_ret < 0) {
if (f2 != NULL)
futex_put(f2, NULL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 4:26 PM (6 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16200832
Default Alt Text
D29250.diff (7 KB)
Attached To
Mode
D29250: Get rid of CTR(9) in linux_futex.c.
Attached
Detach File
Event Timeline
Log In to Comment