[PATCH] strace doesn't show new futex calls
Sripathi Kodi
sripathik at in.ibm.com
Tue Jul 24 11:06:02 UTC 2007
Hi,
strace does not understand PI related futex calls. strace output looks like
this for such calls:
11733 futex(0x602a20, 0x7 /* FUTEX_??? */, 11733 <unfinished ...>
11734 futex(0x602a20, 0x6 /* FUTEX_??? */, 1 <unfinished ...>
11732 <... futex resumed> ) = 0
11733 <... futex resumed> ) = 0
version of strace: strace -- version 4.5.15
The following patch fixes the problem. It defines in strace all the FUTEX_*
calls that are defined in glibc. Please let me know if the patch is good.
Thanks,
Sripathi.
PS: Please CC me on reply, I have not subscribed to the list.
Signed-off-by: Sripathi Kodi <sripathik at in.ibm.com>
Index: strace-4.5.15/process.c
===================================================================
--- strace-4.5.15.orig/process.c 2007-07-23 14:05:07.000000000 +0530
+++ strace-4.5.15/process.c 2007-07-23 14:17:44.000000000 +0530
@@ -117,6 +117,21 @@
# ifndef FUTEX_REQUEUE
# define FUTEX_REQUEUE 3
# endif
+# ifndef FUTEX_CMP_REQUEUE
+# define FUTEX_CMP_REQUEUE 4
+# endif
+# ifndef FUTEX_WAKE_OP
+# define FUTEX_WAKE_OP 5
+# endif
+# ifndef FUTEX_LOCK_PI
+# define FUTEX_LOCK_PI 6
+# endif
+# ifndef FUTEX_UNLOCK_PI
+# define FUTEX_UNLOCK_PI 7
+# endif
+# ifndef FUTEX_TRYLOCK_PI
+# define FUTEX_TRYLOCK_PI 8
+# endif
#endif
#ifdef LINUX
@@ -3072,6 +3087,11 @@
{ FUTEX_WAKE, "FUTEX_WAKE" },
{ FUTEX_FD, "FUTEX_FD" },
{ FUTEX_REQUEUE,"FUTEX_REQUEUE" },
+ { FUTEX_CMP_REQUEUE, "FUTEX_CMP_REQUEUE" },
+ { FUTEX_WAKE_OP, "FUTEX_WAKE_OP" },
+ { FUTEX_LOCK_PI, "FUTEX_LOCK_PI" },
+ { FUTEX_UNLOCK_PI, "FUTEX_UNLOCK_PI" },
+ { FUTEX_TRYLOCK_PI, "FUTEX_TRYLOCK_PI" },
{ 0, NULL }
};
More information about the Strace-devel
mailing list